home *** CD-ROM | disk | FTP | other *** search
/ PC-SIG: Games / PC-SIG Games (PC-SIG).iso / 2581 / FIGMENT.DOC < prev    next >
Encoding:
Text File  |  1992-09-17  |  338.2 KB  |  8,468 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                        Figment
  10.  
  11.                               The Imagination Processor
  12.  
  13.  
  14.                                      User's Guide
  15.  
  16.                                          and
  17.  
  18.                                   Command Reference
  19.  
  20.  
  21.                                     Revision 2.46
  22.  
  23.  
  24.                                      August, 1990
  25.  
  26.                        Copyright 1988-1990, Patch Panel Software
  27.                                  11590 Seminole Blvd.
  28.                                   Seminole, FL 34648
  29.                                      813-397-3530
  30.  
  31.                                  All Rights Reserved.
  32.  
  33.  
  34.                     Figment is a trademark of Patch Panel Software
  35.  
  36.  
  37.  
  38.           Information in this document is subject to  change without notice
  39.           and  does not represent a  commitment on the  part of Patch Panel
  40.           Software.  The software  described in this document is  furnished
  41.           as shareware.  The software package may be re-distributed only in
  42.           its entirety as the program "Figpkg.exe".
  43.  
  44.           Users   are  requested  to   register  their  copies.     A  more
  45.           comprehensive,  fully  typeset   and  perfect-bound   (paperback)
  46.           version of this book is available  to registered users along with
  47.           upgrades.    Additional  graphics and  music  utilities  are also
  48.           available to registered customers.   Consult the file "Order.frm"
  49.           for details.
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.           Figment User's Guide                            Table of Contents
  58.  
  59.                                   Table of Contents
  60.  
  61.  
  62.           Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   1
  63.                A.   Overview of Features  . . . . . . . . . . . . . . .   1
  64.                B.   How to Read This Document . . . . . . . . . . . . .   2
  65.  
  66.           Part I.   The Presentation Environment  . . . . . . . . . . .   4
  67.                A.   Getting Started . . . . . . . . . . . . . . . . . .   4
  68.                B.   The Screen Display  . . . . . . . . . . . . . . . .   6
  69.                C.   The Object of the Story . . . . . . . . . . . . . .   7
  70.                D.   Command Lines . . . . . . . . . . . . . . . . . . .   8
  71.                E.   Synonyms  . . . . . . . . . . . . . . . . . . . . .  11
  72.                F.   The Actor . . . . . . . . . . . . . . . . . . . . .  11
  73.                G.   Command Logs  . . . . . . . . . . . . . . . . . . .  12
  74.                H.   Command Reference . . . . . . . . . . . . . . . . .  14
  75.  
  76.           Part II.  The Story Editor  . . . . . . . . . . . . . . . . .  28
  77.                A.   Introduction to the Editor  . . . . . . . . . . . .  28
  78.                B.   Theory of Operation . . . . . . . . . . . . . . . .  28
  79.                C.   How to Make an Interactive Story  . . . . . . . . .  28
  80.                D.   Method of Editing . . . . . . . . . . . . . . . . .  30
  81.                E.   Cut, Paste, and Insert Functions  . . . . . . . . .  32
  82.                F.   The Top Level Editor  . . . . . . . . . . . . . . .  34
  83.                G.   Summary of Editing Operations . . . . . . . . . . .  35
  84.                H.   Stuff Editor  . . . . . . . . . . . . . . . . . . .  37
  85.                I.   Scene Editor  . . . . . . . . . . . . . . . . . . .  49
  86.                J.   Story Maps  . . . . . . . . . . . . . . . . . . . .  50
  87.                K.   Story Rules (Logic Programming) . . . . . . . . . .  54
  88.                L.   Editing Rule Bases  . . . . . . . . . . . . . . . .  62
  89.                M.   Pre-Command Rules . . . . . . . . . . . . . . . . .  74
  90.                N.   Conditional Function Reference  . . . . . . . . . .  77
  91.                O.   Executional Function Reference  . . . . . . . . . .  84
  92.                P.   Player Maps . . . . . . . . . . . . . . . . . . . .  92
  93.                Q.   Synonym Editing . . . . . . . . . . . . . . . . . .  93
  94.                R.   Parameter Editing Screen  . . . . . . . . . . . . .  94
  95.                S.   Link and Attribute Type Definitions . . . . . . . .  98
  96.                T.   Profiles  . . . . . . . . . . . . . . . . . . . . .  99
  97.                U.   Standard Messages and Text Variables  . . . . . . . 101
  98.                V.   Full-Screen Text Editor . . . . . . . . . . . . . . 104
  99.                W.   File Management . . . . . . . . . . . . . . . . . . 105
  100.                X.   Deleting Objects  . . . . . . . . . . . . . . . . . 111
  101.                Y.   Debugging Tips  . . . . . . . . . . . . . . . . . . 112
  102.  
  103.           Part III. Story Design  . . . . . . . . . . . . . . . . . . . 114
  104.                A.   Skill Level . . . . . . . . . . . . . . . . . . . . 114
  105.                B.   Examine Strings . . . . . . . . . . . . . . . . . . 115
  106.                C.   Health Points . . . . . . . . . . . . . . . . . . . 115
  107.                D.   Strength  . . . . . . . . . . . . . . . . . . . . . 116
  108.                E.   Conflicts . . . . . . . . . . . . . . . . . . . . . 116
  109.  
  110.                                                                           i
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.           Table of Contents                            Figment User's Guide
  119.  
  120.                F.   Links . . . . . . . . . . . . . . . . . . . . . . . 118
  121.                G.   Controlling the Random Number Generator . . . . . . 120
  122.                H.   Potions and the Drink Function  . . . . . . . . . . 121
  123.                I.   Weighty Matters . . . . . . . . . . . . . . . . . . 121
  124.                J.   Size and Containers . . . . . . . . . . . . . . . . 122
  125.                K.   Waving the Flags  . . . . . . . . . . . . . . . . . 122
  126.                L.   Reading Scrolls . . . . . . . . . . . . . . . . . . 123
  127.                M.   Strategic Weapons . . . . . . . . . . . . . . . . . 123
  128.                N.   Food  . . . . . . . . . . . . . . . . . . . . . . . 125
  129.                O.   Characters as Containers  . . . . . . . . . . . . . 126
  130.                P.   Rules and Changing Scenes . . . . . . . . . . . . . 126
  131.                Q.   User-definable Command Parser . . . . . . . . . . . 126
  132.                R.   The Actor in Rules  . . . . . . . . . . . . . . . . 130
  133.                S.   The '@'-Words . . . . . . . . . . . . . . . . . . . 131
  134.  
  135.                                         Index . . . . . . . . . . . . . 133
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.           ii
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.           Figment User's Guide                                 Introduction
  180.  
  181.           Introduction 
  182.            
  183.           Figment is multi-media authoring  system for interactive fiction.
  184.           It is a tool for manipulating  text (and when purchased, graphics
  185.           and songs) under  computer control either to  present information
  186.           or  to create  an illusion.   This makes  it good  for developing
  187.           certain types of simulators, role-playing trainers, and certainly
  188.           for entertainment.   Figment  has special  features for  modeling
  189.           character development which makes it  a unique tool for character
  190.           and plot modeling as well.
  191.  
  192.           You can develop stories and trade  them with other Figment users.
  193.           You  can also  obtain a copy  of "Figlet", the  play-only form of
  194.           Figment.  Figlet  is the  distribution vehicle  for material  you
  195.           generate  with Figment.  Figlet users  are licensed to distribute
  196.           Figlet  freely  with  their material  to  make  stand-alone story
  197.           disks.
  198.  
  199.           Figment is a spread-sheet/word processor/debugger for interactive
  200.           fiction.  You  can write, play,  and debug your  work all in  one
  201.           package.  No tedious  compiling or loading is required.   You can
  202.           run  your work immediately.  Figment  brings the logic out to the
  203.           user level where you  can modify it or do whatever  you want with
  204.           it.   The  editor displays  all the  data  structures for  you to
  205.           modify.
  206.  
  207.           A.   Overview of Features
  208.  
  209.           Briefly, Figment's many internal features are:
  210.  
  211.           1.   The  window-managed display  manages the  screen efficiently
  212.                during playback.   Color is supported  in text and  graphics
  213.                modes.
  214.           2.   The  Scene  Description  highlights changes  during  play in
  215.                reverse video, an excellent aid to comprehension.
  216.           3.   The  command  parser  closely  models  natural  English  and
  217.                supports  series  operators,   multiple  sentences,   object
  218.                synonyms, and function synonyms.
  219.           4.   The   user-definable   command   parser   supports   boolean
  220.                operations  on  word  groups.   It  makes  possible  a  very
  221.                flexible  command  entry  and  opens  the story  to  include
  222.                virtually any user statement as a legal command.
  223.           5.   Function and object name synonyms.
  224.           6.   Commands can be logged  and played back like a  player piano
  225.                with speed control or single-stepped for debugging.
  226.           7.   The system  senses player  efficiency and  can respond  with
  227.                messages tailored to the user's skill.
  228.           8.   Viewpoints allow you  to describe situations from  the point
  229.                of  view  of the  different characters  in  the scene.   The
  230.                player can assume  the role of  these characters to see  the
  231.  
  232.                                                                           1
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.           Introduction                                 Figment User's Guide
  241.  
  242.                story  from   their  perspective   and  to   manipulate  the
  243.                characters.
  244.           9.   Full-screen data entry editors.
  245.           10.  Text can  be entered in  a simple  typing buffer or  a full-
  246.                screen text editor as required.
  247.           11.  The at-symbol (@)  denotes special  words to be  substituted
  248.                into  your text including the user's name, the Actor's name,
  249.                the scene name, the command line, etc.
  250.           12.  Cut and paste operations are supported for editing most data
  251.                structures.
  252.           13.  User-defined  attributes  let   you  build  rich   character
  253.                definitions.
  254.           14.  Character profiles present  a weighted  decision matrix   of
  255.                attributes so you can say for example "If Actor does not fit
  256.                profile of leader..."
  257.           15.  User-defined object types, a useful adjunct to profiles.
  258.           16.  Links  between objects  can have  user-definable types  with
  259.                positive or negative values. You can interpret the values as
  260.                meaning      like/dislike,     strong/weak,      attraction/
  261.                repulsion...whatever you like.
  262.           17.  Frame-based inference  engine.   The rule-base  is built  in
  263.                small rule-bases local to  specific situations allowing good
  264.                performance.     Both  global  and   local  rule-bases   are
  265.                supported.
  266.           18.  The  Player  map gives  the player  a  memory of  places and
  267.                things,  and  fore-knowledge of  them  as well.    It allows
  268.                commands like "find object_name" or "go to place_name".
  269.           19.  Script file output  can be generated  from your story.   The
  270.                script can be printed on your line printer or edited in your
  271.                word processor.
  272.  
  273.           In addition, graphics and  music can be keyed to the  story for a
  274.           multi-media presentation.   The graphics  can be  displayed in  a
  275.           windowed  text-with-graphics style  like a  WYSIWYG  DTP package.
  276.           This version will  play music  and graphics, but  they cannot  be
  277.           written  without   the  optional   graphics  and   music  library
  278.           utilities.   The  music requires  an  Adlib board  for  playback.
  279.           Contact Patch Panel for more information.
  280.  
  281.  
  282.           B.   How to Read This Document
  283.  
  284.           Figment has two distinct parts: the Presentation Environment, and
  285.           the  Editor.   Part  I of  this  book describes  the Presentation
  286.           Environment where  you play the  material that you  have written.
  287.           Part I closes with a reference guide of all the commands  used in
  288.           Playback mode.
  289.  
  290.           Part  II  discusses the  Editor.   This  part describes  only the
  291.           mechanical  process  of  editing  the   data.    It  deliberately
  292.  
  293.           2
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.           Figment User's Guide                                 Introduction
  302.  
  303.           postpones discussion and theory to Part III.  Part II includes  a
  304.           reference guide of all the  conditional and executional functions
  305.           you use to write your story rules. 
  306.  
  307.           Part III describes the  inter-relationship of all the  pieces and
  308.           illustrates constructions used to create different effects.  Part
  309.           III is organized  by topics and represents the  programer's notes
  310.           for every feature.
  311.  
  312.           The   Appendices   discuss    revisions   and   data   conversion
  313.           considerations when converting stories from older revisions.  
  314.  
  315.                Note:   Figment has  an optional graphics  presentation
  316.                mode,  but  you will  find  no  mention of  it  in this
  317.                document.    For  information  regarding  any  graphics
  318.                operation,  consult the  User's  Guide for  the Figment
  319.                Graphics Library Utility (Figglu)  distributed with the
  320.                Figglu software.   Similarly, any discussion  of music-
  321.                related work  is found  in the  corresponding book  for
  322.                Emilu.
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.                                                                           3
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.           Presentation Environment                     Figment User's Guide
  363.  
  364.           Part I.   The Presentation Environment
  365.  
  366.           When you start  Figment, you enter the  presentation environment.
  367.           Here you  find a scenario  description and you  give English-like
  368.           commands that act upon the various scene elements.  Your software
  369.           comes with a  demo story, an  accompanying log file,  and a  file
  370.           called "super.clu" for people who haven't the time to struggle.
  371.  
  372.  
  373.           A.   Getting Started
  374.  
  375.           Stories are kept in files with ".sdf" file extension, but you  do
  376.           not specify the extension.  All you  have to do to start the demo
  377.           story is type "Figment"  followed by the path  to the story  data
  378.           file:
  379.  
  380.                figment demo
  381.                figment b:demo                ;demo on drive b
  382.                figment c:\datafiles\demo     ;demo in another directory
  383.  
  384.           It's a  good idea to do this now so you can follow along with the
  385.           discussion.
  386.  
  387.           A title screen is displayed, and your story begins, but before we
  388.           proceed, we should  stop and describe other options  for starting
  389.           Figment while we are on the topic.
  390.  
  391.  
  392.           1.   Starting a New Story
  393.  
  394.           When you want to write a new story, you simply make up a name and
  395.           specify that when starting Figment.  Thus:
  396.  
  397.                figment mystery
  398.  
  399.           creates  a new database.  Read the  section on File Management in
  400.           Part II.
  401.  
  402.  
  403.           2.   DOS Command Line Switches
  404.  
  405.           Figment lets  you specify  different options  using command  line
  406.           switches, indicated by a  slash, when you start the  program from
  407.           DOS.  You  may place a  switch anywhere in  the DOS command  line
  408.           (except on the word  "figment" itself) and Figment will  find it.
  409.           For example:
  410.  
  411.                Figment /s
  412.                Figment /s demo 10
  413.                Figment demo/s 10
  414.  
  415.           4
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.           Figment User's Guide                     Presentation Environment
  424.  
  425.                Figment demo 10 /s
  426.  
  427.           All of Figment's switches can be combined and given in any order.
  428.           You may  use upper or lower  case letters.  Switches  are removed
  429.           from the command line before Figment counts its arguments.  Thus:
  430.  
  431.                Figment /s demo 10
  432.  
  433.           Figment sees  "demo" as  its first  argument and  reads the  file
  434.           called "demo.sdf".  It sees "10" as its second argument, the seed
  435.           specification for the random number generator.
  436.  
  437.  
  438.           a.   Suppress Status Indicator Switch - /s
  439.  
  440.           Some  stories  do not  need the  Status  Indicator.   This switch
  441.           suppresses the Status Indicator display.  
  442.  
  443.  
  444.           b.   Suppress Inventory Switch - /i
  445.  
  446.           This switch suppresses the inventory display.
  447.  
  448.  
  449.           c.   Select Display Switch - /Dn
  450.  
  451.           Figment automatically tests and  selects the appropriate  display
  452.           mode,  but some  clone adapters  (notably non-register-compatible
  453.           EGA clones) can confuse the test giving undesirable results.  The
  454.           system appears to "hang".  If this symptom occurs, try specifying
  455.           the adapter manually with the display switch:
  456.  
  457.                figment demo 10/D3       ;3 = EGA Color
  458.  
  459.                /Dn where n=
  460.  
  461.                     1    MDA  Monochrome Display Adapter (No graphics)
  462.                     2    CGA
  463.                     3    EGACOLOR
  464.                     4    EGAMONO
  465.                     5    VGAMONO
  466.                     6    VGACOLOR
  467.                     7    MCGACOLOR
  468.                     8    MCGAMONO
  469.                     9    HERCULES
  470.  
  471.           EGAMONO and VGAMONO tells  Figment to use Black & White text even
  472.           though  the  devices  can   model  colors  as  shades  of   gray.
  473.           Conversely, you could force mono screens to "color" when you want
  474.           them to display gray text.
  475.  
  476.                                                                           5
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.           Presentation Environment                     Figment User's Guide
  485.  
  486.  
  487.                Note:  Forcing  a non-Hercules device to  Hercules mode
  488.                might not be a good thing to do.
  489.  
  490.           B.   The Screen Display
  491.  
  492.           Once  you have  started Figment,  you  should note  four distinct
  493.           regions on the screen.  These regions are "dynamic", meaning they
  494.           stretch and shrink as needed to accommodate changing needs.
  495.  
  496.  
  497.           1.   Status Indicator
  498.  
  499.           The Status Indicator, printed  in reverse video at the top of the
  500.           screen, displays  the status of a  few key story parameters.   It
  501.           can be customized to the story  requirements.  Some stories might
  502.           not use it at all.
  503.  
  504.  
  505.           2.   Inventory
  506.  
  507.           The Inventory  region grows as  your list of  acquisitions grows.
  508.           Again, some stories might not use it.  It changes when you change
  509.           viewpoint to reflect the actor's possessions.  (A  useful feature
  510.           since you might not know them otherwise.)
  511.  
  512.  
  513.           3.   Scene Description
  514.  
  515.           As  the  story  progresses,  elements  of the  Scene  Description
  516.           change.  The newly changed  descriptions are displayed in reverse
  517.           video to emphasize them making it easy to see the effects of your
  518.           commands.
  519.  
  520.           The Description Window can process  multi-page descriptions.  The
  521.           screen display pauses and  you get the message "strike any key to
  522.           continue" between pages.
  523.  
  524.           The  Scene  Description comes  in long  and  brief forms.   Shift
  525.           between modes with the toggle command:
  526.  
  527.                >toggle
  528.  
  529.           Think of this as  though there were a two-position  toggle switch
  530.           on the instrument panel.  One position is labeled "Long Mode" and
  531.           the other position is labeled  "Brief Mode".  Each time  you give
  532.           the "toggle" command you are switching  the display from one mode
  533.           to the other.  You are said to be toggling the display.
  534.  
  535.  
  536.  
  537.           6
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.           Figment User's Guide                     Presentation Environment
  546.  
  547.           4.   Command Window
  548.  
  549.           The Command  Window scrolls  your commands  and their  responses.
  550.           Figment displays  its ready  prompt, "Player:".   If  you entered
  551.           your name at  the start then it  displays your name here,  and it
  552.           also  changes names  to reflect the  name of  the actor  when you
  553.           change viewpoints.
  554.  
  555.           The  Command  Window  scrolls split-screen  fashion  as  you give
  556.           commands so that  the scrolling  lines do not  destroy the  Scene
  557.           Description.  Ordinary reports  to your actions are given  to the
  558.           command region:
  559.  
  560.                >go east
  561.                You can't go that way.
  562.  
  563.           The Command  Window can  also process  multi-page responses,  but
  564.           note that the  command dialogue is always  sacrificed; it scrolls
  565.           off the top of the Command Window and is lost.  Therefore be sure
  566.           you have read this message before typing any key to continue.  
  567.  
  568.  
  569.           C.   The Object of the Story
  570.  
  571.           Most interactive  fiction  is  driven  by  manipulating  objects,
  572.           meaning you  can examine them, take  them, drop them, etc.   They
  573.           represent "story  variables".   (Figment also recognizes  special
  574.           complex statements.  See also the User-Defined Command Parser.)
  575.  
  576.           Some objects,  function as containers  which can hold  many other
  577.           objects.    Opening these  objects  reveals their  contents while
  578.           closing them conceals the contents.
  579.  
  580.           Object names  are composed of a few words,  at least one of which
  581.           should be  embedded in the scene  description so that  you have a
  582.           couple of chances  of guessing right.   Either of the words  is a
  583.           legal handle to identify the object.  An object called "oil lamp"
  584.           might be addressed in any of the following ways:
  585.  
  586.                >take oil
  587.                >take the oil lamp
  588.                >take the lamp lighting the room
  589.                >take the lamp and jump in the lake
  590.  
  591.           Common modifiers like  "a", "an",  "the" etc. are  ignored.   The
  592.           command processor gets the drift early in the command and ignores
  593.           any elaborations you tack on the end.  You may use upper or lower
  594.           case letters as you like.
  595.  
  596.           By  now,  you should  recognize that  commands begin  with verbs.
  597.  
  598.                                                                           7
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.           Presentation Environment                     Figment User's Guide
  607.  
  608.           Verbs cannot be abbreviated:
  609.  
  610.                >ta balloon
  611.                I don't understand the command: "ta".
  612.                >take balloon
  613.                You take the Red Balloon.
  614.  
  615.           Object names represent  arguments to the  verb functions.   Names
  616.           can be abbreviated:
  617.  
  618.                >take ball
  619.                You take the Red Balloon.
  620.  
  621.           This presumes that the string "ball" is unique within the current
  622.           scene.  If,  however, there were an object called  "Blue Ball" in
  623.           the same scene, then you would be just as  likely to get the Blue
  624.           Ball as the Red Balloon.
  625.  
  626.  
  627.           D.   Command Lines
  628.  
  629.           Figment can tolerate commands longer than several lines.  If your
  630.           command should reach  the end  of the screen  line, keep  typing.
  631.           The  cursor  will "wrap  around"  to  the next  line  to continue
  632.           echoing your typing.  Finally, hit "Enter".
  633.  
  634.           Many punctuation operators are supported.  Spaces before or after
  635.           these operators are optional.  It is best not to  use punctuation
  636.           except for cases as described here.
  637.  
  638.           Figment lets you make complex commands  that are broken down into
  639.           simpler commands for execution and logging.  Thus the command:
  640.  
  641.                Take the bat,  ball and  glove from the  box, and  give
  642.                them to the boy.
  643.  
  644.           would be broken into:
  645.  
  646.                take bat from box
  647.                take ball from box
  648.                take glove from box
  649.                give bat to boy
  650.                give ball to boy
  651.                give glove to boy
  652.  
  653.           and  dispatched for processing  and logging.   The  resulting log
  654.           appears  as  though each  little  command were  given separately.
  655.           Conversely, text files of commands can  be read back into Figment
  656.           as  command  logs.   These  text  files can  contain  the complex
  657.           commands  since  Figment will  break them  down into  the simpler
  658.  
  659.           8
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.           Figment User's Guide                     Presentation Environment
  668.  
  669.           forms and dispatch accordingly.  (See Command Logs.)
  670.  
  671.  
  672.           1.   Articles
  673.  
  674.           Articles such as  "the", "a" and "an" are stripped out.  You need
  675.           not use  them if you do not want to.  They look nice in documents
  676.           like this so we use them in our examples.
  677.  
  678.  
  679.           2.   Text Editor for Commands
  680.  
  681.           The full-screen text editor is implemented for the command buffer
  682.           so that you can correct mistakes.  Hit F6 anytime while typing to
  683.           get the  text editor.  "Escape"  exits the editor and  leaves the
  684.           cursor  at the end  of the newly edited  command line waiting for
  685.           you to hit Enter.
  686.  
  687.  
  688.           3.   Multiple Sentences in a Command - the Period Operator
  689.  
  690.           Multiple sentences can be given in  a single command separated by
  691.           a period.  Thus:
  692.  
  693.                Take the bat. Go north. Give the bat to the boy.
  694.  
  695.           Figment will stop  executing at the first  failed command (caused
  696.           either by user-error or the author's inhibiting  the command) and
  697.           wait for a new command line.  If you hit F6 immediately, you will
  698.           get the failed command for editing.
  699.  
  700.           The last period on a line is optional.
  701.  
  702.  
  703.           4.   Series Operations - the Comma Operator
  704.  
  705.           A  comma  between objects  signifies a  series  of objects  to be
  706.           submitted to a command for repeat processing.   A series may also
  707.           use the  modifier "and",  and spaces  are not  required when  the
  708.           comma separates the objects.  Note that a series can be  as short
  709.           as two objects:
  710.  
  711.                take bat,ball
  712.                take bat and ball
  713.                take bat, ball, glove.
  714.                take bat, ball, and glove
  715.                take bat, ball and glove
  716.                take bat,ball,and glove
  717.  
  718.           A series may be embedded between the verb and its modifier:
  719.  
  720.                                                                           9
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.           Presentation Environment                     Figment User's Guide
  729.  
  730.  
  731.                take bat,ball,glove from box
  732.                give bat,ball,glove to boy
  733.  
  734.           but a series cannot be used with destinations after the modifier:
  735.  
  736.                take candy. give candy to Bobby, Billy and Mary
  737.  
  738.           A series  cannot be used  with verbs.   "Take, drop and  kick the
  739.           football" is illegal.
  740.  
  741.  
  742.           5.   Pronouns
  743.  
  744.                a.   "it"
  745.  
  746.                Substitutes the last object used.  If no previous definition
  747.                for "it" exists,  the message  "vague pronoun reference"  is
  748.                issued.
  749.  
  750.                     Take the book from the box and give it to the boy.
  751.  
  752.                Note that this will give the book to the boy and not the box
  753.                to  the  boy.   Note  also  that this  carries  over between
  754.                commands:
  755.  
  756.                     Take book.
  757.                     examine             ;examines scene leaves pronoun
  758.                                          unaffected
  759.                     Give it to the boy.
  760.  
  761.                This pronoun can lead to some confusion:
  762.  
  763.                     Take the arrows and give it to the indian.
  764.  
  765.                Technically, this is correct since the object named "arrows"
  766.                is  a  single object,  but the  name  implies a  plural case
  767.                causing some  people to say "them" which  would substitute a
  768.                series yielding unexpected results.
  769.  
  770.  
  771.                b.   "them"
  772.  
  773.                A pronoun that is used to substitute the last series used.
  774.  
  775.                     Take the bat, ball, and box, and give them to
  776.                     the boy.
  777.  
  778.                This variable  is also global  between command lines  and it
  779.                also returns a  message, "vague  series reference", when  no
  780.  
  781.           10
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.           Figment User's Guide                     Presentation Environment
  790.  
  791.                definition exists.
  792.  
  793.  
  794.           E.   Synonyms
  795.  
  796.           Figment  supports synonyms for the command  functions and for the
  797.           object names  as well.   This makes the  story more flexible  and
  798.           lets it flow smoother.  The  author defines the synonyms. "q"  is
  799.           the synonym for "quit".
  800.  
  801.  
  802.           F.   The Actor
  803.  
  804.           The Actor is the character speaking to Figment.  Most often, this
  805.           is the  Player, but  when you  see a  different character  in the
  806.           scene, you can assume that role and act as that character.
  807.  
  808.           When  you  begin a  story, the  command  line indicates  that the
  809.           current Actor is  the Player.  It  does this by printing  a ready
  810.           prompt that is  the player name  followed by a  colon.  It  looks
  811.           like this:
  812.  
  813.                Player:
  814.  
  815.           You  change the Actor  by typing the  name of a  character in the
  816.           scene followed by a colon ":".  Figment responds with a new ready
  817.           prompt  indicating  the new  character  is  speaking.   Using  an
  818.           example from our demo:
  819.  
  820.                Player: fairy:           ;the player becomes the fairy
  821.                Toothy Fairy:            ;and performs now as the fairy
  822.  
  823.           This  action costs  no  moves and  triggers no  story logic.   Of
  824.           course the character must exist in the scene or you get an error.
  825.           You also get an error message when you omit the colon (:).
  826.  
  827.           You can combine this action with the command for the actor:
  828.  
  829.                Player: fairy: examine wand
  830.                <examination report of fairy's view of wand follows>
  831.                Toothy Fairy:
  832.  
  833.           The fairy remains  the Actor until you  decide to change back  to
  834.           the player or to another character.
  835.  
  836.           When  you  change  the  Actor, the  Status  Indicator  changes to
  837.           reflect the  new Actor's attributes.  The  Inventory also changes
  838.           to  reflect  the  Actor's  possessions.   The  Scene  Description
  839.           changes to reflect  the new Actor's  viewpoint.  This may  change
  840.           only a portion  of the description  depending on how much  of the
  841.  
  842.                                                                          11
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.           Presentation Environment                     Figment User's Guide
  851.  
  852.           story is written from the new Actor's viewpoint.
  853.  
  854.  
  855.           G.   Command Logs
  856.  
  857.           Commands can be logged in a disk file for later replay.  Mistakes
  858.           are not logged.  The replay can be automatic like a  player piano
  859.           or single-stepped by hitting the F9 key.
  860.  
  861.           Command logs are intended primarily so designers  can debug their
  862.           work,  but  other  uses  are  emerging.    They  are  useful  for
  863.           generating script files.   They are  95% cheaper than save  files
  864.           for reproducing  a previous  state and  they can  reproduce every
  865.           state  along the way  to the final  one.  You  would need maybe a
  866.           hundred save files to do that.
  867.  
  868.           An Interactive Fiction  is a  database of objects  and rules  for
  869.           their  behavior.    The  log  file  extracts a  story  from  that
  870.           database.  You can change the log file and get a  different story
  871.           from the same database, hence a  different script.  The different
  872.           logs represent different  plots.  If you  are using Figment as  a
  873.           prototyping system,  you can  keep different  logs to  experiment
  874.           with different story lines.
  875.  
  876.           The log playback can be interrupted and restarted so you can stop
  877.           and study your  data.  You  may play  or step a  log file to  any
  878.           point in  the log.   If you then  turn logging on,  your commands
  879.           will be added from that point on, effectively changing the log to
  880.           your new sequence.  However, the best way to make command logs is
  881.           to use your text  editor.  That way, you can put  comments on the
  882.           end of any line indicated with a prefixed ";" character.   Thus a
  883.           command sequence such as:
  884.  
  885.                     take the ball       ;the boy left it here
  886.                     north               ;enter the house
  887.                     pause               ;stop to check data in editor
  888.                     put ball on table
  889.                          ...commands continue like this
  890.  
  891.           can  be written  in a  word  processor and  used as  a  log file.
  892.           Comments must end before  the end of the  line.  Of course a  log
  893.           file made in Figment cannot generate comments.
  894.  
  895.           The text file from your word processor must not  contain any word
  896.           processing codes such  as margin  settings, fonts, indents,  page
  897.           breaks  etc.   If the resulting  text file will  not type cleanly
  898.           with the DOS "type"  command, it will not  be suitable input  for
  899.           Figment.
  900.  
  901.           Logs can be played back at user-defined speeds.  The command:
  902.  
  903.           12
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.           Figment User's Guide                     Presentation Environment
  912.  
  913.  
  914.                play demob 5
  915.  
  916.           will play the  log file called "demob.log" with a  5 second delay
  917.           between  commands.   Users  with high  speed 386  processors will
  918.           probably want to  use this option to slow the playback down.  The
  919.           delay is specified in integer seconds.  You cannot specify delays
  920.           less than one second.
  921.  
  922.           You  can specify  any log  file name  you like.   If  you  do not
  923.           indicate a log file  name, the system will use the  last log name
  924.           used.  Failing that, it will use a log file with the same name as
  925.           the story.   See also the Command Reference for the "play", "log"
  926.           and "step (F9)" commands.
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.                                                                          13
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.           Presentation Environment                     Figment User's Guide
  973.  
  974.           H.   Command Reference
  975.  
  976.           Commands  are  formed  in simple  English,  typically  verb-noun.
  977.           Figment recognizes its  own built-in  commands and special  user-
  978.           defined commands.  The author of  the story uses the user-defined
  979.           command to create a unique command for special  situations ("kiss
  980.           the toad").   We cannot  discuss those commands  since we do  not
  981.           know what authors will develop.   Therefore this section can only
  982.           discuss the built-in commands.
  983.  
  984.           In  the  following  syntax  definitions,  "<>" means  you  insert
  985.           something at that  point in the  command.  For example,  <object>
  986.           would mean that you would  supply an object's name.   The symbols
  987.           "[]"  mean  that the  part  of  the command  enclosed  therein is
  988.           optional.  You do not actually type the characters "<>" or "[]".
  989.  
  990.           Use the following commands when playing the story.  Of course the
  991.           story author has ways of inhibiting or subverting these commands,
  992.           so  you might  not get  the anticipated  effect, but that  is the
  993.           challenge of interactive fiction.
  994.  
  995.  
  996.           1.   Charm
  997.  
  998.           Syntax:   Charm <character>
  999.  
  1000.           The  one-shot  version of  the  Hex  command that  allows  you to
  1001.           disengage.  You may  also skip a wager  here, but it costs you  a
  1002.           move.
  1003.  
  1004.           See also  Fight, Hex and Hit.
  1005.  
  1006.  
  1007.           2.   Close
  1008.  
  1009.           Syntax:   Close <thing or feature>
  1010.  
  1011.           The  inverse  of  the  open  function.    Used  most  often  with
  1012.           containers,  but  may also  be used  with  other objects  such as
  1013.           doors.  See also: open, lock, unlock.
  1014.  
  1015.  
  1016.           3.   Drink
  1017.  
  1018.           Syntax:   Drink <thing>
  1019.  
  1020.           Some  things are  suitable for consumption  others are  best left
  1021.           alone.    The effects  may be  devastating  or beneficial.   Only
  1022.           experience can help you here.  See also: eat.
  1023.  
  1024.  
  1025.           14
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.           Figment User's Guide                     Presentation Environment
  1034.  
  1035.  
  1036.           4.   Drop
  1037.  
  1038.           Syntax:   Drop <thing>
  1039.  
  1040.           Drops something  you have  in  the scene.   This  is the  inverse
  1041.           function of "take".  Some places just are not safe places to drop
  1042.           things:
  1043.  
  1044.                >drop the baseball
  1045.                You drop the Baseball and it disappears.
  1046.  
  1047.           Sometimes you have to shed items to make room for new things:
  1048.  
  1049.                >take ball
  1050.                You can't carry any more.
  1051.                >drop bat
  1052.                You drop the bat.
  1053.                >take ball
  1054.                You take the ball.
  1055.  
  1056.  
  1057.           5.   Eat
  1058.  
  1059.           Syntax:   Eat <object>
  1060.  
  1061.           You must  eat from time  to time.   Some objects are  quite good;
  1062.           some less so.  See also: drink.
  1063.  
  1064.  
  1065.           6.   Examine
  1066.  
  1067.           Syntax:   Examine [me or <object>]
  1068.  
  1069.           The examine function is very important because it often gives you
  1070.           essential  clues.    Examination  costs   you  a  move,  but  the
  1071.           information can often  be worth it.  Players who  have played the
  1072.           story before  have already examined the thing  in question, hence
  1073.           they achieve the  goal with fewer  moves and they rise  to higher
  1074.           levels of skill.  Thus skill is a function of experience.
  1075.  
  1076.           The examine function comes in several forms:
  1077.  
  1078.                "examine" by itself will describe the scene.
  1079.                "examine me" will describe you, the player.
  1080.                "examine" followed by an object name will describe the 
  1081.                object.
  1082.  
  1083.  
  1084.           7.   F1 - Enter Story Editor
  1085.  
  1086.                                                                          15
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.           Presentation Environment                     Figment User's Guide
  1095.  
  1096.  
  1097.           Syntax:   F1 Function Key
  1098.  
  1099.           Hitting the F1 key enters the  editor at the first editing screen
  1100.           or the last  screen you were editing  if you are returning.   The
  1101.           story is unaffected by this action (unless you edit it),  and you
  1102.           may safely return to the story  as you left it.  Hit F1  again to
  1103.           return to the Presentation Environment.
  1104.  
  1105.  
  1106.           8.   F6 - Comand Text Editor
  1107.  
  1108.           Syntax:   F6 Function Key
  1109.  
  1110.           The  full screen text editor is  implemented for editing commands
  1111.           when they fail.   This is most  often used when you  give several
  1112.           command sentences as  one command  line.  If  your command  fails
  1113.           because of a typo, hit F6, edit the text, escape and hit enter.
  1114.  
  1115.  
  1116.           9.   F9 - Step a log file
  1117.  
  1118.           Syntax:   F9 Function Key  
  1119.  
  1120.           The step  function is used to execute a log file one command at a
  1121.           time.  It is implemented as the F9 key.
  1122.  
  1123.           Before you play your log file, you must re-establish the state of
  1124.           the story when the logging process was started.  Do this with the
  1125.           "restore" or "restart"  functions then hit F9.  Each time you hit
  1126.           F9, one command will execute.
  1127.  
  1128.           You can step partway through a  file, turn logging on, and log  a
  1129.           new sequence of commands.  When you play back your log,  you will
  1130.           get your original sequence  up to the point where  you re-enabled
  1131.           logging.   From there on, you get your  new sequence.  It is wise
  1132.           to  make an insurance copy of the log before modifying it.
  1133.  
  1134.           The step command does  not let you specify a file  name.  It will
  1135.           use the  last log name used, if none was  used, then the log name
  1136.           matching the story name.
  1137.  
  1138.           You can step through a log then say:
  1139.  
  1140.                play continue t     where t = delay time in seconds
  1141.  
  1142.           The log will then play out to the end automatically.
  1143.  
  1144.           See also: Log, Play, and Save.
  1145.  
  1146.  
  1147.           16
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.           Figment User's Guide                     Presentation Environment
  1156.  
  1157.  
  1158.           10.  F10 - DOS Shell
  1159.  
  1160.           Syntax:   F10 Function Key
  1161.  
  1162.           You can leave  Figment to go  to the DOS  command interpreter  by
  1163.           hitting F10.  You may then  do any work on your machine that  you
  1164.           like   (word   processing,   spreadsheets,   document   printing,
  1165.           communications, etc.)  When  you are ready to return  to Figment,
  1166.           simply type "exit".  You will return to Figment exactly where you
  1167.           left off.
  1168.  
  1169.           This is a  useful feature for searching  through various floppies
  1170.           for files.   If you will be gone a long time, it is probably wise
  1171.           to save your story before you leave.  (See the command Save.)
  1172.  
  1173.           This  function  expects  to  find  the DOS  command  interpreter,
  1174.           "COMMAND.COM" on the diskette in the default disk drive.  You get
  1175.           an error  message and  remain in  Figment if  COMMAND.COM is  not
  1176.           found.  
  1177.  
  1178.           This function depends on  your having enough memory to  do useful
  1179.           work once you  are out of Figment.   Use the  CHKDSK  program  on
  1180.           your DOS disk to see how much memory you have  once you have left
  1181.           Figment.
  1182.  
  1183.           While  you  are gone,  Figment  sleeps  in memory  awaiting  your
  1184.           return.   DOS reminds  you of this  fact so you  will not forget,
  1185.           switch off your machine, and lose your work.
  1186.  
  1187.  
  1188.           11.  Fight
  1189.  
  1190.           Syntax:   Fight <character>
  1191.  
  1192.           A fight  is a battle of strength.   You are locked into the fight
  1193.           until it completes,  and the only way  to complete is for  one of
  1194.           the protagonists  to  die (see  also Hit).   The  odds favor  the
  1195.           stronger fighter, but certain objects improve your odds by adding
  1196.           to  your  strength.     Fights  are random  processes  with their
  1197.           outcome  weighted  by  the  strengths  of the  two  protagonists.
  1198.           Sometimes weaker combatants win; they just get lucky.
  1199.  
  1200.           Fighting is bad  for your health.   Lose most of your  health and
  1201.           you  lose your strength.  Lose all your  health and you die.  You
  1202.           have  some  control over  this process  since  you can  wager the
  1203.           number of health points  you want to commit on each  cycle of the
  1204.           fight.   This  implies that you  can hit  heavy or hit  light and
  1205.           receive in kind.  For example, if you wager 4 points,  the system
  1206.           computes a random transaction and apportions the results:
  1207.  
  1208.                                                                          17
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.           Presentation Environment                     Figment User's Guide
  1217.  
  1218.  
  1219.                Wager: 4
  1220.                You hit the <character> 3 times.
  1221.                The <character> hits you 1 times.
  1222.  
  1223.           This means that  your opponent  loses 3 health  points while  you
  1224.           lose only 1  point.  It also means that your maximum wager is the
  1225.           full number of  health points that you  have.  If you  wager more
  1226.           than you have,  Figment automatically reduces your  wager to your
  1227.           health count.  Of course, you might lose them all, in  which case
  1228.           you die.
  1229.  
  1230.           You can wager zero health  points which means that you  skip this
  1231.           random number in  the hopes  of skipping  a possibly  unfavorable
  1232.           one.  You  can skip indefinitely, but you are in an infinite loop
  1233.           requesting wagers  so  eventually you  must  commit to  a  wager.
  1234.           Skipping also costs a  move, but considering it can  cost several
  1235.           moves to recuperate a  lost health point, it can  be a successful
  1236.           strategy to skip.
  1237.  
  1238.           Your  health  recovers  with time  after  the  fight.   You  gain
  1239.           strength  and  sometimes  skill  as  a  result  of  defeating  an
  1240.           opponent.
  1241.  
  1242.           A one-shot form of the fight command is provided as "Hit".
  1243.  
  1244.           See also Hit, Charm, and Hex.
  1245.  
  1246.  
  1247.           12.  Find
  1248.  
  1249.           Syntax:   Find <object>
  1250.  
  1251.           This command will locate  people and things you have  seen before
  1252.           in prior scenes.  It will change the scene to the scene where the
  1253.           object is.   You cannot find objects  you do not know  exist, and
  1254.           you only know objects exist by  seeing them in scenes.  Sometimes
  1255.           you have more knowledge  than you realize so it does  not hurt to
  1256.           try.
  1257.  
  1258.           This command is subject to any  restrictions on path computation.
  1259.           See also the "Go" command for more information on paths.
  1260.  
  1261.  
  1262.           13.  Give
  1263.  
  1264.           Syntax:   Give <thing> [to] <character>
  1265.  
  1266.           The forms:
  1267.  
  1268.  
  1269.           18
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.           Figment User's Guide                     Presentation Environment
  1278.  
  1279.                >give the book to the boy
  1280.                >give book to boy
  1281.                >give book boy
  1282.  
  1283.           are all legal, but the form:
  1284.  
  1285.                >give the boy the book
  1286.  
  1287.           is not legal.
  1288.  
  1289.           If you do not have the prescribed object in  your possession, but
  1290.           it can be found in the scene, Figment will automatically take the
  1291.           object for you and then give it to the character.  This counts as
  1292.           a two step action  meaning your move count is  incremented twice.
  1293.           The "take"  action is a fully  separate command, which is  to say
  1294.           that the Story Designer can impose conditions on that action.
  1295.           See also: put, take.
  1296.  
  1297.  
  1298.           14.  Go
  1299.  
  1300.           Syntax:   Go  <direction>
  1301.                         <[to][the]scene name>
  1302.  
  1303.           As  you  move   in  different  directions,  you   change  scenes.
  1304.           Directions are given as the four  points of the compass plus "up"
  1305.           and "down".  Thus:
  1306.  
  1307.                >go north
  1308.                >go up
  1309.  
  1310.           Actually, "go" is optional and the  directions can be abbreviated
  1311.           to n, e, w, s, u, and d.  So:
  1312.  
  1313.                >n
  1314.  
  1315.           changes to the scene to the north of the current scene as defined
  1316.           by the story map.  
  1317.  
  1318.           The "go"  command also  recognizes the  names of  places (scenes)
  1319.           where the player has been before.  The player can say:
  1320.  
  1321.                go to the river
  1322.                go home
  1323.                go to the basement
  1324.  
  1325.           The scene you  specify must be a  scene you have been  in before,
  1326.           and  you must  know the  directions back  to the  scene from  the
  1327.           current scene (typically by virtue of experience).
  1328.  
  1329.  
  1330.                                                                          19
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.           Presentation Environment                     Figment User's Guide
  1339.  
  1340.           As  you  explore different  scenes,  you acquire  knowledge about
  1341.           where scenes  are in  relation  to each  other.   When  you  have
  1342.           reached that level of  understanding about the story, it  is nice
  1343.           to let Figment do the work for you.
  1344.  
  1345.           Figment will compute a  path and begin moving through  the scenes
  1346.           along the  path until  the destination  is reached.   Each  scene
  1347.           change  along  the way  is a  legal  move and  is subject  to any
  1348.           constraints upon the  player that the player  would experience if
  1349.           the  moves  were made  manually.   If  your health  or  your food
  1350.           supplies are low, this command might exhaust you since each scene
  1351.           change increments the move count.
  1352.  
  1353.           It  is  conceivable  that  the  destination  is  known,  but  the
  1354.           directions needed  to construct  the path  to it  are not  known.
  1355.           When Figment cannot construct a path, it reports, "You don't know
  1356.           the way from here."  The player will have to explore some more by
  1357.           giving the  compass directions  until more  directions along  the
  1358.           path are known.
  1359.  
  1360.           Some scenes function like one-way valves.  They have no return to
  1361.           earlier scenes.   If such a scene lies  along your path, the path
  1362.           function will always fail when you try to return to prior scenes.
  1363.  
  1364.           Each change of scene is subject to any restrictions placed on the
  1365.           "go" command in  each scene along the  way.  You may  encounter a
  1366.           scene along the  way that restricts  your leaving until you  have
  1367.           performed  some  special  task.    In   such  a  case,  the  path
  1368.           terminates.  When you have completed  the task, you can continue,
  1369.           if you wish, by repeating your command: "go to the river".
  1370.  
  1371.           The Designer can give  you knowledge of places and  directions at
  1372.           the start  of the story.   In which  case, the path  function can
  1373.           succeed even if  you have never been  to the scene before.   It's
  1374.           worth a try, and it's valuable knowledge if it's true.
  1375.  
  1376.  
  1377.           15.  Hex
  1378.  
  1379.           Syntax:   Hex  <character>
  1380.  
  1381.           "Hex" is the same as "Fight"  except you compete on the basis  of
  1382.           magical ability.  The one-shot form of Hex is Charm.
  1383.  
  1384.           See also Charm, Fight, and Hit.
  1385.  
  1386.  
  1387.           16.  Hit
  1388.  
  1389.           Syntax:   Hit <object>
  1390.  
  1391.           20
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.           Figment User's Guide                     Presentation Environment
  1400.  
  1401.  
  1402.           This  function is  the one-shot form  of the Fight  command.  The
  1403.           command's advantage is that you are  not locked in to a fight  to
  1404.           the death.  It is best reserved for times when your health is low
  1405.           or when you are  surrounded by bad-guys and you wish  to keep the
  1406.           option to retreat.
  1407.  
  1408.           See also Charm, Fight, and Hex.
  1409.  
  1410.  
  1411.           17.  Lock
  1412.  
  1413.           Syntax:   Lock <thing or feature>
  1414.  
  1415.           Used to prevent objects from being opened.
  1416.  
  1417.           See also: unlock, open, close.
  1418.  
  1419.  
  1420.           18.  Log
  1421.  
  1422.           Syntax:   Log  [name] [on or off]
  1423.  
  1424.           The command:
  1425.  
  1426.                >log on
  1427.  
  1428.           turns on command logging.   A log file with the name of the story
  1429.           and an extension  of ".log" will be  created if none exists.   If
  1430.           said file exists, it is opened  and commands are appended to  the
  1431.           end of the  file so previously logged commands will  not be over-
  1432.           written.  If you want a fresh file, you will have to use "F10" to
  1433.           go  to DOS  and  delete the  existing log  file before  you begin
  1434.           logging.
  1435.  
  1436.           Playback is dependent  on the  exact state of  the scene and  its
  1437.           objects at  any given  time.   Thus, unless  you save  your story
  1438.           before logging, you  will not easily  recreate the same state  so
  1439.           you can play your log back.
  1440.  
  1441.           The command:
  1442.  
  1443.                >log off
  1444.  
  1445.           turns logging off  and closes the log file.   Typically, you will
  1446.           not see  any disk activity until  you turn off  logging since DOS
  1447.           buffers small writes until you accumulate enough data to  justify
  1448.           writing.
  1449.  
  1450.           The command,  "log" with  no modifiers  (on or  off) toggles  the
  1451.  
  1452.                                                                          21
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.           Presentation Environment                     Figment User's Guide
  1461.  
  1462.           logging feature from "off" to "on" and vice versa allowing you to
  1463.           stop logging momentarily and turn  it back on again when  you are
  1464.           ready to log commands again.
  1465.  
  1466.           While logging is "on", Figment warns you by printing "Logging" in
  1467.           reverse video off to the right side of the command line.
  1468.  
  1469.           The log file does not log wagers  so you will be re-entering them
  1470.           manually when playing back log files.  In order to get consistent
  1471.           results  with fight sequences  when playing  back logs,  you will
  1472.           want to specify the seed for the random number generator.
  1473.            
  1474.           The log file is  an ASCII file that can be  read directly in your
  1475.           text editor.  It can also be written by same.
  1476.  
  1477.           See also: save, restore, play, and step (F9).
  1478.  
  1479.  
  1480.           19.  Open
  1481.  
  1482.           Syntax:   Open <thing or feature>
  1483.  
  1484.           Used to access the contents of containers.  Might also be applied
  1485.           to other objects such as doors.  Locked objects cannot be opened.
  1486.           Open containers describe their contents  in the Scene Description
  1487.           and Inventory.
  1488.  
  1489.                >open the box
  1490.                You open Pandora's Box.
  1491.                >open the door
  1492.                The Inner Sanctum Door is locked.
  1493.  
  1494.           See also: close, lock, unlock.
  1495.  
  1496.  
  1497.           20.  Pause Command
  1498.  
  1499.           The command  "Pause" is  an empty  command whose  sole reason  to
  1500.           exist is to  be logged in a  log file.  When  the "play" function
  1501.           encounters  a  pause  statement  during  playback, it  stops  the
  1502.           playback at that point.   Pause is particularly useful  with text
  1503.           editing of log text files (see below).  Playback can be continued
  1504.           with the command "play cont".
  1505.  
  1506.           Do not confuse  "pause" with "wait".  See  also: Play, Step (F9),
  1507.           Wait.
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.           22
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.           Figment User's Guide                     Presentation Environment
  1522.  
  1523.           21.  Play
  1524.  
  1525.           Syntax:   Play [name] [cont] [delay]
  1526.  
  1527.           The "play"  command replays  a log  file created  with the  "log"
  1528.           command or your text editor.  You will want to restore your saved
  1529.           version  of your  story before  playing back the  log file.   The
  1530.           playback can be  very rapid so you  may want to hit  your "pause"
  1531.           key to  study the  responses or  use the  "step" command  (F9) to
  1532.           execute logged commands one at a time.
  1533.  
  1534.           You can slow down  the playback by specifying the  delay interval
  1535.           between  commands.    The  delay   is  specified  as  an  integer
  1536.           representing the delay between  commands in seconds.   Thus "play
  1537.           5" plays the default log with  a 5 second delay between commands.
  1538.  
  1539.           If you strike the key, "i" or "I" while Figment is playing a log,
  1540.           the playback  will interrupt  playback immediately.   The  "step"
  1541.           command (F9)  may then  be used to  advance the  log file  or the
  1542.           playback can be resumed with the continue option.
  1543.  
  1544.           The option "cont"  continues the log  playback after it has  been
  1545.           interrupted or paused.  Of course, it also works after stepping a
  1546.           log  file any number of moves  with F9.  The  form of the command
  1547.           is:
  1548.  
  1549.                >play cont
  1550.  
  1551.           You can specify log  file names in the play command.   This means
  1552.           you can play or step to  a pre-determined point then switch to  a
  1553.           different log.
  1554.  
  1555.           See also: save, restore, log, and step (F9).
  1556.  
  1557.  
  1558.           22.  Put
  1559.  
  1560.           Syntax:   Put <thing> [in or on] <thing or feature>
  1561.  
  1562.           Put is pretty straightforward, but the author can inhibit it with
  1563.           certain objects.
  1564.  
  1565.                >put the ball in the box
  1566.                >put the book on the table
  1567.                >put the book on the flagpole
  1568.                You can't put that there.
  1569.  
  1570.           If you do not have the  prescribed object in your possession, but
  1571.           it can be found in the scene, Figment will automatically take the
  1572.           object for you  and then put it  in or on the object.   This two-
  1573.  
  1574.                                                                          23
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.           Presentation Environment                     Figment User's Guide
  1583.  
  1584.           step action is  treated as a fully separate  command, which is to
  1585.           say that the  author can impose  conditions on the "take"  action
  1586.           and your move count increments twice.
  1587.  
  1588.           See also: give, take-from.
  1589.  
  1590.  
  1591.           23.  Quit
  1592.  
  1593.           Syntax:   Quit
  1594.  
  1595.           Ends  your  Figment session  and returns  you  to DOS.   Consider
  1596.           saving your session  to disk first.   This is the only  legal way
  1597.           out of Figment  (Ctrl-C works,  but it isn't  legal).  Even  when
  1598.           editing, you return to the Presentation Environment side and exit
  1599.           with "quit".   Quit shuts  down music and  switches off  graphics
  1600.           mode when those features are used.   Ctrl-C does not.
  1601.  
  1602.           See also: Save.
  1603.  
  1604.  
  1605.           24.  Read
  1606.  
  1607.           Syntax:   Read [<Object>]
  1608.  
  1609.           If the  appropriate  story  conditions do  not  hold  true,  this
  1610.           function just prints gibberish.
  1611.  
  1612.  
  1613.           25.  Restart
  1614.  
  1615.           Syntax:   Restart [<Story Name>]
  1616.  
  1617.           This restarts the story at the beginning.  If you do  not specify
  1618.           a name it assumes  you want to restart the current  story you are
  1619.           playing.   If you garble  the name, you  get a list  of available
  1620.           stories.
  1621.  
  1622.           You  cannot  restart  a story  that  you  saved  with the  "save"
  1623.           command.   Use  "restore"  for that.    See the  section  on File
  1624.           Management for more information on ".sdf" and save files.
  1625.  
  1626.           See also save, restore.
  1627.  
  1628.  
  1629.           26.  Restore
  1630.  
  1631.           Syntax:   Restore [<Story Name>]
  1632.  
  1633.           This reloads a  file that  was saved previously  with the  "save"
  1634.  
  1635.           24
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.           Figment User's Guide                     Presentation Environment
  1644.  
  1645.           command (See below).  If you do not specify a name it assumes you
  1646.           want to restore  the story you  are playing.   If you garble  the
  1647.           name, you get a list of available stories.
  1648.  
  1649.           Restore differs from restart.  The state of  the story returns to
  1650.           the state at the time the story was saved.
  1651.  
  1652.           See also save, restart, log.
  1653.  
  1654.  
  1655.           27.  Save
  1656.  
  1657.           Syntax:   Save [<Story Name>]
  1658.  
  1659.           This function saves the story in  its current state in a file  on
  1660.           the  disk  with  the  specified name.    Do  not  specify  a file
  1661.           extension.  A save file is reloaded with "restore".
  1662.  
  1663.           If you do  not specify a name,  Figment assumes you want  to save
  1664.           the data under the current name.   If you specify a name, Figment
  1665.           changes the current story  name to that name.  Figment  keeps the
  1666.           last save file as a backup renamed to a ".bak" extension.
  1667.  
  1668.           In order to use a ".bak" file, you must rename it to a ".sav"  or
  1669.           ".sdf" file.  You do this with the DOS command "rename".   Again,
  1670.           exit with  F10, make  the changes,  return and  use "restore"  or
  1671.           "restart".
  1672.  
  1673.           See also Top Level Editor, File Management, Restore, Restart, and
  1674.           Log.
  1675.  
  1676.  
  1677.           28.  Script
  1678.  
  1679.           Syntax:   Script [on or off]
  1680.  
  1681.           The script command will output the story to a listing file.   The
  1682.           resulting  text  file can  be read  into  your word  processor or
  1683.           printed on your line printer.  The listing is contained in a file
  1684.           with the name of the story and a ".lst" file extension.
  1685.  
  1686.           This command is  modeled after  the "Log" command  so you  should
  1687.           rcognize the usage.
  1688.  
  1689.           While scripting is enabled, Figment prints "Scripting" in reverse
  1690.           video at the right of the command line.
  1691.  
  1692.           It is  probably best to play  a log file with  scripting enabled,
  1693.           but  you can also  use it when you  are giving commands manually.
  1694.           You can toggle  scripting on and  off by saying "script"  with no
  1695.  
  1696.                                                                          25
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.           Presentation Environment                     Figment User's Guide
  1705.  
  1706.           on/off modifiers.   This lets  you turn off  scripting while  you
  1707.           experiment then reenable scripting and proceed.
  1708.  
  1709.  
  1710.           29.  Shoot
  1711.  
  1712.           Syntax:   Shoot <object> [with <weapon>]
  1713.  
  1714.           The shoot function requires great skill.   The life expectancy of
  1715.           novices shooting weapons is extremely  short, but don't take  our
  1716.           word for it.  Only certain weapons qualify as weapons that can be
  1717.           shot.  You would not shoot  a sword for instance.  This  function
  1718.           gives  you an  alternative to fighting  on the basis  of magic or
  1719.           strength.  If you  have more than one  suitable weapon, you  must
  1720.           specify which one to use.
  1721.  
  1722.  
  1723.           30.  Take
  1724.  
  1725.           Syntax:   Take <thing> [from <object>]
  1726.  
  1727.           You  can take  a  thing from  the  scene or,  optionally, from  a
  1728.           character or feature in  the scene.  You get an  error message if
  1729.           you  attempt to  take the character  or feature itself  or if you
  1730.           simply mis-type.
  1731.  
  1732.                >take the amulet
  1733.                You take the Amulet of Zendor.
  1734.                >take the keg from the Saint Bernard
  1735.                You take the Wooden Keg.
  1736.                >take the Saint Bernard
  1737.                You can't take the Saint Bernard.
  1738.                >take the #$%^#
  1739.                You can't take the #$%^#.
  1740.  
  1741.  
  1742.           31.  Toggle
  1743.  
  1744.           Syntax:   Toggle
  1745.  
  1746.           Changes the Scene  Description from the long-hand  description to
  1747.           the short-hand description.   Whenever you return to a  scene you
  1748.           have been in before, you get a short-hand description.  This will
  1749.           change the display mode back to the long-hand description.
  1750.  
  1751.  
  1752.           32.  Unlock
  1753.  
  1754.           Syntax:   Unlock    <thing or feature>
  1755.  
  1756.  
  1757.           26
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.           Figment User's Guide                     Presentation Environment
  1766.  
  1767.           Many things must be unlocked before they can be opened.   In many
  1768.           cases, finding the keys that do this  is the central theme of the
  1769.           story.
  1770.  
  1771.  
  1772.           33.  Wait
  1773.  
  1774.           Syntax:   Wait [number]
  1775.  
  1776.           Skill suffers  by waiting,  but health  can recuperate.   If  you
  1777.           specify a  number, Figment will  wait that number of  moves.  Any
  1778.           events that  would normally transpire  on those moves  will still
  1779.           take place even though waiting is in itself an empty command.
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.                                                                          27
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.           The Story Editor                             Figment User's Guide
  1827.  
  1828.           Part II.  The Story Editor
  1829.  
  1830.           Part  II discusses  the mechanics  of editing.   Use  it  as your
  1831.           editing reference when you want to  know how to change something.
  1832.           The "what and why"  of editing is discussed in Part  III once you
  1833.           understand the mechanics.
  1834.  
  1835.  
  1836.           A.   Introduction to the Editor
  1837.  
  1838.           The Editor is comprised of several data entry screen editors that
  1839.           allow you to change important story elements, including the story
  1840.           logic, with a few simple keystrokes.  You can enter the editor at
  1841.           any time before  or during  play to  fix a bug.   Similarly  when
  1842.           developing material  in the editor,  you can  switch to  playback
  1843.           mode and see immediately how it plays.
  1844.             
  1845.           You  will understand the editor much better if you have a working
  1846.           example in  front of  you.  Call  up the  demo shipped  with your
  1847.           software and follow along with the discussion trying each  topic.
  1848.           You cannot damage the original data  so, by all means, experiment
  1849.           at every stage of  the discussion.  Hit the  F1 key to flip  back
  1850.           and forth between the story and the editor.  Try it now.
  1851.  
  1852.  
  1853.           B.   Theory of Operation
  1854.  
  1855.           With  Figment,  you  create  objects  and  scenes.   The  objects
  1856.           represent characters,  props, and  features  in the  scene.   The
  1857.           scenes represent  places where the objects reside.  You associate
  1858.           the objects to  their scenes by making  a link from the  scene to
  1859.           the object.
  1860.  
  1861.           Scenes are tied  together by the Story  Map.  With the  map done,
  1862.           you  can  use the  "go" command  in  Presentation Mode  much like
  1863.           walking through the  rooms on a house  tour.  Without a  map, you
  1864.           are stuck forever in the first scene.
  1865.  
  1866.           You write rules to govern the object behavior.  The collection of
  1867.           all  rules is  called the  story logic.   Without the  logic, the
  1868.           story is lifeless;  the player  can manipulate  the objects,  but
  1869.           nothing exciting happens.
  1870.  
  1871.  
  1872.           C.   How to Make an Interactive Story
  1873.  
  1874.           From  the  above, you  should  recognize a  simple  procedure for
  1875.           creating a story:
  1876.  
  1877.                Create objects
  1878.  
  1879.           28
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.           Figment User's Guide                             The Story Editor
  1888.  
  1889.                Create scenes
  1890.                Link objects to scenes
  1891.                Create map to relate scenes one to another
  1892.                Create logic
  1893.  
  1894.           Of course you need not create all your objects before  you create
  1895.           scenes, etc.  You just need a few to get going.  You can add more
  1896.           later.
  1897.  
  1898.           The map gives your story structure so  the first few sessions are
  1899.           aimed at building up the map so you can take the house tour.
  1900.  
  1901.           Logic development is  the hardest so  postpone it until you  have
  1902.           sketched out your story  with scenes and objects.  It  is easy to
  1903.           develop "Paralysis by Analysis" so do not get too deep into logic
  1904.           development too soon.
  1905.  
  1906.           Many secondary data  structures are used to  embellish the story:
  1907.           object types,  link  types, attributes,  and profiles.   You  add
  1908.           these  as  you need  them to  make  the rules  so do  not concern
  1909.           yourself with these  too early in the project.  The Player Map is
  1910.           made for you automatically during play, but you can fill it in if
  1911.           you want to give the player foreknowledge of places and things  -
  1912.            another embellishment.
  1913.  
  1914.           Use command logs.  Make one very  early in the project and use it
  1915.           to drive  your  development efforts.    When you  make a  log  in
  1916.           playback mode, you can only log commands that succeed, but if you
  1917.           make the log  in your  word processor, you  can deliberately  add
  1918.           commands  that you know will  fail.  Why?  Because  a log made in
  1919.           Figment  represents completed  work, but  a log  made outside  of
  1920.           Figment can represent  future work.  The  log fails in the  early
  1921.           going,  but  as you  develop  more  data and  rules  you progress
  1922.           further and  further until  finally you can  complete the  entire
  1923.           log.  You  then go back and make a harder  outline and repeat the
  1924.           process.  Also learn  to insert "Pause" commands at  points where
  1925.           you know the  log will  fail, then you  can experiment  manually.
  1926.           And since you need to use logs so much, you will probably want to
  1927.           fix the random number  generator so get used to  starting Figment
  1928.           from DOS with the command form:
  1929.  
  1930.                figment <story_name> <seed_number>
  1931.  
  1932.           The first log you write is probably only the commands required to
  1933.           navigate through the  scenes to  the final scene  of your  story.
  1934.           Gradually you  add activities  within the  scenes developing  the
  1935.           rules for them.   Single step through your log and  take notes of
  1936.           things you want  to change.  Change  your log first.   Change the
  1937.           logic as required to make the log work.
  1938.  
  1939.  
  1940.                                                                          29
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.           The Story Editor                             Figment User's Guide
  1949.  
  1950.           Recognize that what  you are making is really  a model.  Although
  1951.           the model  can improve, it can never really be finished since you
  1952.           can  always  add more  conditions by  expanding  the log  file or
  1953.           writing a  completely different one.   But eventually,  the model
  1954.           becomes  sufficiently  large  to  encompass  a  large  number  of
  1955.           situations and demands placed on it.  At that point, you probably
  1956.           deem the work "complete enough".
  1957.  
  1958.  
  1959.           D.   Method of Editing
  1960.  
  1961.           The method of editing could be  described as a "Poor-man's Mouse"
  1962.           interface since you will be navigating across the screen with the
  1963.           cursor control keys and in many  cases changing values with them.
  1964.  
  1965.           Figment is remarkably fault tolerant.  The two most notable areas
  1966.           where it is  not are the  areas of file  management and  deleting
  1967.           objects.   In both cases,  Figment is obliged  to assume that you
  1968.           want  the command  performed and  so  performs it.    It is  your
  1969.           responsibility  to  understand  the full  ramifications  of these
  1970.           commands.   To that  end, special  sections on  these topics  are
  1971.           provided late in  the editing discussion  when you have a  better
  1972.           understanding of the  editing operations.   Until you reach  that
  1973.           point, we recommend that you do not do these operations.
  1974.  
  1975.  
  1976.           1.   Scrolling Values
  1977.  
  1978.           Except where text  is specifically required, you  merely position
  1979.           the cursor over the data value you want to change, then hold down
  1980.           the up- or  down-arrow cursor keys until you reach  the value you
  1981.           want.   Release the key, and the new  value is set.  We call this
  1982.           process "scrolling the  data value".   Most data  values are  set
  1983.           this way so you will hear the term many times in this document.
  1984.  
  1985.           Usually different data types are displayed in different locations
  1986.           so when scrolling values, there is never any confusion about what
  1987.           is being changed.   In some  cases (notably expression  editing),
  1988.           different data types can be used in the same location.  When this
  1989.           occurs, we use the "Home" key to change the data type then we use
  1990.           the up-/down-arrow keys to scroll the data value.  Pay particular
  1991.           attention whenever we  discuss the  Home key, because  it is  not
  1992.           obvious from looking at the screen that the Home key can be used.
  1993.  
  1994.  
  1995.           2.   Navigating the Screen
  1996.  
  1997.           In  order to  scroll a data  value, you  have to move  the cursor
  1998.           around the screen to the  value's position.  There are two  pairs
  1999.           of keys  that will do that.   The left-/right-arrow keys move the
  2000.  
  2001.           30
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.           Figment User's Guide                             The Story Editor
  2010.  
  2011.           cursor within the current editing level.  We call this "advancing
  2012.           the  cursor".    The Page-up/Page-Down  keys  change  the current
  2013.           editing level.  Often,  you must step down through  several mini-
  2014.           levels.  The Escape key is used as a super-exit key when you want
  2015.           to leave these levels and move on to another task.
  2016.  
  2017.  
  2018.           3.   Text Editing
  2019.  
  2020.           Text can be changed in two ways.  You can simply type in new text
  2021.           to replace the  old text, or  you can use  a full screen  editor.
  2022.           Typing is the easiest way when  the text is small such as  object
  2023.           names.  Your editing  capability in the typing buffer  is limited
  2024.           to the backspace  key for correcting  typos however.  Often,  you
  2025.           begin to  write a  little message  and end  up writing  a monster
  2026.           several sentences long riddled with corrections you would like to
  2027.           make.  No problem.   Just hit F6 and the  text is swept into  the
  2028.           full screen editor.
  2029.  
  2030.           The full-screen text  editor pulls the  text into a buffer  where
  2031.           you can use common word processing commands to move around in the
  2032.           buffer  and change the text.   This is the preferred text editing
  2033.           method  for the longer  messages you want  to write.   A separate
  2034.           section  of this  document  is devoted  to  the full-screen  text
  2035.           editor.
  2036.  
  2037.           Any text item  can be up to 2 KBytes long, including names, which
  2038.           is about a full screen completely covered with text.  Considering
  2039.           that scene  descriptions and  command responses  are composed  of
  2040.           several text items,  you can  compose screenfuls of  text if  you
  2041.           desire.    Bear in mind that this  costs computer memory, but you
  2042.           should find that your imagination is taxed before the system is.
  2043.  
  2044.           A text  item  can be  "erased"  (set to  length  zero) simply  by
  2045.           striking the key  labeled "Enter" (or "Return" on some keyboards)
  2046.           instead of typing  text when  the cursor is  positioned over  the
  2047.           text item.  In fact, it is so  easy to do this we caution you  to
  2048.           stay away from the Enter key until you are sure you want it.
  2049.  
  2050.           Text strings that you write are passed around during play and may
  2051.           be used  in several  different places.   Often  they are  grouped
  2052.           together to form paragraphs  and they are added and  removed from
  2053.           that  paragraph  as  the  play  progresses.    Figment  runs  the
  2054.           paragraph through  a low-budget pretty-printer  which breaks  the
  2055.           lines at word  boundaries.   Therefore, if you  attempt to  force
  2056.           some artificial  format on  the text  within the  editor, it  can
  2057.           often look wrong at run-time.
  2058.  
  2059.           Similarly, hyphenating  produces unexpected results  at run-time.
  2060.           Unless the word is actually a hyphenated  word, it is best not to
  2061.  
  2062.                                                                          31
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.           The Story Editor                             Figment User's Guide
  2071.  
  2072.           insert additional hyphens.
  2073.  
  2074.           Ignore  end-of-line restrictions  and simply  type blindly  away.
  2075.           When the cursor reaches the end of the line, it simply wraps to a
  2076.           new line and keeps on going.  This produces lines with words that
  2077.           wrap in  the middle, but  as we said,  Figment cleans this  up at
  2078.           run-time.
  2079.  
  2080.           You can  always use hard-returns if  you want them, and  you need
  2081.           them  for  paragraph breaks,  but you  must  use the  full screen
  2082.           editor to enter them, because they terminate the typing buffer.
  2083.  
  2084.  
  2085.           4.   Error Message Reports
  2086.  
  2087.           Most errors are  simple mis-steps and  only merit a beep.  Larger
  2088.           errors  report to  the second line  of the  screen.   The message
  2089.           remains until you hit another key.
  2090.  
  2091.  
  2092.           E.   Cut, Paste, and Insert Functions
  2093.  
  2094.           Cut  and  paste operations  have been  implemented for  some data
  2095.           structures, but  not all.  We discuss the general nature here and
  2096.           cover  details on a  case-by-case basis for  each data structure.
  2097.           These  functions  are  context-sensitive,  meaning  you  get  the
  2098.           correct  cut-paste operation  for the  item on  which the  screen
  2099.           cursor is positioned.
  2100.  
  2101.  
  2102.           1.   Insert
  2103.  
  2104.           The "insert" function is designed to open a gap in a list of data
  2105.           elements and leave you a  new data item for editing.   It is used
  2106.           wherever  the  order of  items is  important.   Currently,  it is
  2107.           implemented for rule  bases, expressions and rule  messages.  You
  2108.           insert  a new data  item into a  list or sequence  by hitting the
  2109.           Insert key when the cursor is positioned over  the item where you
  2110.           want the new item inserted.
  2111.  
  2112.  
  2113.           2.   Cut - F7
  2114.  
  2115.           The cut  function (F7 key)  parks a  data structure  in a  buffer
  2116.           temporarily for pasting to a new location in a list or  sequence.
  2117.           It  is  implemented for  text strings  of  all kinds,  rules, and
  2118.           expressions.
  2119.  
  2120.           Different cut buffers are used  for each data type.  Cutting  one
  2121.           data type will  not overwrite any  different data type parked  in
  2122.  
  2123.           32
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.           Figment User's Guide                             The Story Editor
  2132.  
  2133.           its  cut  buffer.    It  does,  however, overwrite  the  existing
  2134.           contents of  the buffer  when you  repeatedly cut  the same  data
  2135.           type.
  2136.  
  2137.           Text  strings can be  cut anywhere  they are  used in  objects or
  2138.           rules.   They can then be pasted back  in new places.  This means
  2139.           that you can  cut description  strings out of  objects and  paste
  2140.           them back as rule messages and vice versa.
  2141.  
  2142.           The  F7 key will  cut a text  item whenever the  screen cursor is
  2143.           positioned at the  start of  the text.   You cannot  take half  a
  2144.           string.  Cut the whole string, paste a copy back and edit the two
  2145.           strings separately.
  2146.  
  2147.           The cut buffers are not written to disk so they do not carry over
  2148.           between sessions,  but  they  are  unaffected  by  play  or  file
  2149.           read/write operations.
  2150.  
  2151.  
  2152.           3.   Paste - Alt-F7, Shift-F7
  2153.  
  2154.           The paste function pastes a copy of the appropriate cut buffer to
  2155.           the new location as  indicated by the screen cursor.   If the cut
  2156.           buffer is empty, meaning  you forgot to cut something,  the paste
  2157.           function just beeps.
  2158.  
  2159.           When  you  paste  a text  string  in  an  object (description  or
  2160.           examination  message), the old  string at the  cursor location is
  2161.           deleted and replaced with a copy of the string in the cut buffer.
  2162.           You can move  to another location and  paste another copy  of the
  2163.           same string.   For object text  strings, the Shift-F7 and  Alt-F7
  2164.           keys are synonymous.  You can use either key.
  2165.  
  2166.           Sequences behave slightly differently.   When you paste something
  2167.           in a list or sequence, the existing  items are bumped back in the
  2168.           sequence,  and the  item in  the cut  buffer is  inserted  in the
  2169.           sequence.   Repeated pastes make  multiple copies.  Rules in rule
  2170.           bases, expressions  in clauses  and  rule message  lists are  all
  2171.           examples of items in sequences or lists.
  2172.  
  2173.           The two different paste  keys, Shift-F7 and Alt-F7,  are provided
  2174.           so that you can insert items in the sequence differently.  Shift-
  2175.           F7 inserts the item into the sequence  after the item your cursor
  2176.           is pointing to.  Thus if your cursor points to item number 7, the
  2177.           newly pasted item becomes  item number 8 and the  cursor advances
  2178.           to point to it.  Alt-F7 inserts the new item before the item your
  2179.           cursor is pointing to.  Thus, item 7 becomes item 8 and the newly
  2180.           pasted  item  becomes  item  7  to  which your  cursor  is  still
  2181.           pointing.
  2182.  
  2183.  
  2184.                                                                          33
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.           The Story Editor                             Figment User's Guide
  2193.  
  2194.           Alt-F7 appears most like the traditional paste  operation used in
  2195.           word processors so it will seem most natural to you.  Shift-F7 is
  2196.           used most for tacking items onto the ends of lists and sequences,
  2197.           a frequent task.  
  2198.  
  2199.  
  2200.           F.   The Top Level Editor
  2201.  
  2202.           The  highest  level in  the editing  hierarchy  is the  Top Level
  2203.           Editor.  It calls the different  screen editors for the different
  2204.           Story Elements.  You also read and write many data files from the
  2205.           Top Level Editor.
  2206.  
  2207.           You enter the Top Level Editor  from the Presentation Environment
  2208.           by hitting the F1  key.  This puts the first screen editor on the
  2209.           screen,  the  Stuff  Editor.   The  Top  Level  Editor is  always
  2210.           displayed as the top line in any other screen editor  (except the
  2211.           text editor).
  2212.  
  2213.           The editor will warn  you when you attempt to edit  data or write
  2214.           data to disk that has been changed during play:
  2215.  
  2216.                Warning! Data changed during play.  Proceed? (Y/N)
  2217.  
  2218.           You have the choice of proceeding  with your action or retrieving
  2219.           the data  from disk (Use  Shift-F2.   See File Management).   You
  2220.           will only be warned once; if you proceed to edit the altered data
  2221.           you will not be warned if you write it to disk.
  2222.  
  2223.           You return  to the Presentation  Environment via the  Page-Up key
  2224.           from the  Top Level Editor or by hitting  F1 from anywhere in the
  2225.           editor.  Try moving in and out of the Editor hitting F1 and Page-
  2226.           Up:
  2227.  
  2228.                F1 to enter Story Editor from Presentation Mode
  2229.                F1 or Page-Up to exit Editor to Presentation Mode 
  2230.  
  2231.           The different screen  editors form the  next level down from  the
  2232.           Top Level Editor.  You can view these different editors  with the
  2233.           Up-/Down-Arrow keys when the cursor  is positioned by the element
  2234.           name, which it  is when you enter  the Top Level Editor  from the
  2235.           Presentation Environment.   Each time you  hit the key, the  next
  2236.           screen editor is displayed.
  2237.  
  2238.           Note that  as you  keep hitting the  Up-arrow key  you come  back
  2239.           around to the first screen and  that the Down-arrow moves through
  2240.           the list of screens  in the opposite direction.   This philosophy
  2241.           is common throughout the Story Editor; every key has its opposite
  2242.           number and lists are  scrolled through to the end  whereupon they
  2243.           "wrap" back around and  start over.  For long lists,  it is often
  2244.  
  2245.           34
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.           Figment User's Guide                             The Story Editor
  2254.  
  2255.           easier to go  backwards one step from the  beginning to reach the
  2256.           end.
  2257.  
  2258.           The Top Level Editor also controls file input/output, but we will
  2259.           postpone that discussion  until later.   Just note here that  you
  2260.           move over to change the filename with the Left-/Right-arrow keys.
  2261.           As with  the  Up-/Down-arrow keys  you  get the  cursor-wrap  and
  2262.           forward-reverse effects.   F2 and  F3 will read  and write  files
  2263.           respectively anytime your cursor  is anywhere on the top  line so
  2264.           don't hit them until you want to modify files.
  2265.  
  2266.           You can leave  Figment and return  to DOS temporarily by  hitting
  2267.           F10 when  in the Top Level Editor only.   This does not terminate
  2268.           Figment.   It leaves it sleeping in  memory until you return with
  2269.           the DOS command "exit".  This  lets you change filenames or disks
  2270.           before doing file  I/O operations.   F10 is enabled anytime  your
  2271.           cursor is anywhere on the top line of the editor screen.
  2272.  
  2273.           As mentioned  in  the Command  Reference, F10  requires the  file
  2274.           "COMMAND.COM" to be on the diskette in the default drive.
  2275.  
  2276.           So far, we have viewed different screen editors, but  we have not
  2277.           entered them.   Do that with  Page-Down.  Page-Down means  "Enter
  2278.           lower-level  editor".   Correspondingly, Page-Up  means "Exit  to
  2279.           higher level editor".  Change to the screen editor titled "Stuff"
  2280.           using the Up-arrow key,  then hit Page-Down.  Your  screen cursor
  2281.           jumps down to the next level which displays  all the "Stuff" that
  2282.           have been defined for the story.
  2283.  
  2284.  
  2285.           G.   Summary of Editing Operations
  2286.  
  2287.           At this point,  we have  demonstrated much of  the major  editing
  2288.           features  so  a brief  summary is  in  order before  we continue.
  2289.           Figment assigns its editing functions to special keys so they are
  2290.           executed  with single  keystrokes.   The key  assignments are  as
  2291.           follows:
  2292.  
  2293.  
  2294.                           Summary of Editor Key Assignments
  2295.  
  2296.                Up-/Down-Arrow means change  the value  of the item  on
  2297.                which  the cursor  is sitting.    We call  this process
  2298.                scrolling  the  value.   We  deliberately use  the word
  2299.                "scroll"  in  the remainder  of  this document  to mean
  2300.                these arrow keys.
  2301.  
  2302.                Right-/Left-Arrow means advance  to the next item  on a
  2303.                given  editing  level.   We  deliberately use  the word
  2304.                "advance" in  the remainder  of this  document to  mean
  2305.  
  2306.                                                                          35
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.           The Story Editor                             Figment User's Guide
  2315.  
  2316.                these arrow keys.
  2317.  
  2318.                Page-Up/Page-Down  means change  to the  next level  of
  2319.                editing operations.   Hit Page-Up enough times  and you
  2320.                find yourself back in the Presentation Environment.
  2321.  
  2322.                ESC  -  Escape  is  a   super-page-up  key.    Probably
  2323.                preferred to Page-up since it cannot over-shoot the Top
  2324.                Level Editor.  It is a rapid exit from deep levels.
  2325.  
  2326.                F1 enters the Editor from the Presentation Environment.
  2327.                It also is a rapid exit from any level in the editor to
  2328.                the story.   Repeated  strikes on  F1 toggles  back and
  2329.                forth between the editor and the story.
  2330.  
  2331.                F2 reads the file whose  name is given on the top  line
  2332.                of the screen.  F2 only works in the Top Level Editor.
  2333.  
  2334.                F3 writes to  the file whose name  is given on  the top
  2335.                line of  the screen.   F3 only  works in the  Top Level
  2336.                Editor.
  2337.  
  2338.                Shift-F2 reads the  saved data  file, the ".sav"  file.
  2339.                Similar to  "restore" in the  Presentation Environment.
  2340.                It works only in the Top Level Editor.
  2341.  
  2342.                Shift-F3 writes a save file,  the ".sav" file.  Similar
  2343.                to "save" in the Presentation Environment, but there is
  2344.                an important difference - it sets the data to  starting
  2345.                conditions so the ".sav"  file can be renamed a  ".sdf"
  2346.                file.  Top Level only.
  2347.  
  2348.                F4 generates a listing file  of the currently displayed
  2349.                object type or rule  base.  F4  is only enabled in  the
  2350.                Top Level Editor.
  2351.  
  2352.                Shift-F4  generates  a  full listing  file  of  all the
  2353.                objects or all the rule bases  in the database.  Shift-
  2354.                F4 is enabled in the Top Level Editor.
  2355.  
  2356.                F5 alphabetizes the stuff or scene objects depending on
  2357.                which  screen  you  are viewing.    Implemented  at the
  2358.                object name level only (not the Top Level).
  2359.  
  2360.                F6 invokes the full-screen text editor.  ESC exits this
  2361.                editor  and  returns  to  the  Story Editor.    Enabled
  2362.                whenever the cursor is positioned over a text item.
  2363.  
  2364.                F7 - Cuts a text string, rule or expression.
  2365.  
  2366.  
  2367.           36
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.           Figment User's Guide                             The Story Editor
  2376.  
  2377.                Shift-F7 - Paste, the  opposite of F7.  In  a sequence,
  2378.                it pastes after the current item.
  2379.  
  2380.                Alt-F7 - Paste also.  In  a sequence, pastes before the
  2381.                current item.
  2382.  
  2383.                Insert - Inserts (opens) a gap in a list or sequence.
  2384.  
  2385.                F10 exits  Figment temporarily to  DOS. "Exit"  returns
  2386.                you  to  Figment.   F10  only  works in  the  Top Level
  2387.                Editor.
  2388.  
  2389.                "+"   creates  new   things:  objects,   links,  rules,
  2390.                expressions, etc.
  2391.  
  2392.                "Delete" deletes things created with "+".
  2393.  
  2394.                "Home" used mainly in expression editing to change data
  2395.                types for scrolling  values.  Also negates  conditional
  2396.                functions.
  2397.  
  2398.           If you  attempt to think  of these keys as  cursor movement keys,
  2399.           you will have a very hard time  in the editor.  The cursor has  a
  2400.           mind of its own and moves where it must to point to your position
  2401.           in  the editing hierarchy.  In short,  if you're trying to follow
  2402.           the cursor, you're in trouble, because it's following you!
  2403.  
  2404.           In practice, we  break this convention  in only a few  places: in
  2405.           the full-screen  text editor, the  keys are used  as they are  in
  2406.           most word-processors, for example Page-Up moves to the top of the
  2407.           page; in the object editors we move through a matrix of names up,
  2408.           down, left and right with the arrow keys since it seems more like
  2409.           a full-screen  text editing operation;  and in label  editing, we
  2410.           allow the up/down arrow keys to move up  and down a list of names
  2411.           since scrolling is not used there.
  2412.  
  2413.           Once you make this conceptual leap,  you should find that a great
  2414.           many editing operations resolve to only three key-pairs.
  2415.  
  2416.           Play  alters the data so  you must write  your editing changes to
  2417.           disk before  starting play  or they  will be  lost.   A  rigorous
  2418.           editing procedure would dictate that you should enter the editor,
  2419.           examine  data structures to identify a problem, retrieve the save
  2420.           file from disk, make the changes, put  the data back on the disk,
  2421.           return to the  Presentation Environment, and play  through to see
  2422.           if the correction was valid.
  2423.  
  2424.  
  2425.           H.   Stuff Editor
  2426.  
  2427.  
  2428.                                                                          37
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.           The Story Editor                             Figment User's Guide
  2437.  
  2438.           The first  thing to do in developing the  story is to create some
  2439.           objects to  play with.   Objects  come in two  types: Scenes  and
  2440.           Stuff.  "Stuff" are  best defined as objects that are not scenes.
  2441.           Stuff  comes   in   three   types:   "Things",   "Features"   and
  2442.           "Characters".   Stuff and  Scenes are  identical data  structures
  2443.           except that they are  stored in different places.   Therefore, if
  2444.           you learn how to edit Stuff, then you know how to edit Scenes.
  2445.  
  2446.           Objects are large and only a portion of the data can be displayed
  2447.           at a  time.  If you  want to study  all the object data,  you can
  2448.           dump  it to a listing file by hitting  the F4 key when in the Top
  2449.           Level Editor.   This  will dump all  the stuff  objects or  scene
  2450.           objects depending on  which type  is displayed when  you hit  the
  2451.           key.   The data is written to  a file with the same  name as your
  2452.           story but with  a ".lst" extension.   You can print this  on your
  2453.           lineprinter  with the DOS  "print" command.  Use  F10 to invoke a
  2454.           DOS shell so you can type or print this file.
  2455.  
  2456.           You  enter  the  Stuff  Editor  from  the  Top  Level  Editor  by
  2457.           displaying the  screen labeled  "Stuff" using  the Up-Arrow  key.
  2458.           You move down  one level from the  Top Level Editor to  the Stuff
  2459.           Editor using  the Page-Down key.   You exit  the Stuff  Editor by
  2460.           moving up one level to the Top Level Editor with the Page-Up key.
  2461.  
  2462.  
  2463.           1.   Stuff Names
  2464.  
  2465.           When  you enter the  Stuff Editor, you  see the names  of all the
  2466.           stuff that have been defined for the story.  Your cursor lands on
  2467.           the  first name  which is  lit in  reverse-video.  The  names are
  2468.           displayed in a row-column matrix.
  2469.  
  2470.           Hit  the right-arrow  key  and hold  it  down.   The  cursor  and
  2471.           reverse-video box advances sequentially to each object name.  The
  2472.           matrix of names can be large, so  we break convention and use the
  2473.           up-/down-arrow keys to move up and down rows within the matrix.
  2474.  
  2475.           You can  change any object name by typing a new name in its place
  2476.           when the cursor sits on that object's name.  Names are text which
  2477.           means you can  make them up  to 2  KBytes long if  you like.   We
  2478.           display only the first 15 characters.   When you hit return,  the
  2479.           new name is entered in place of the old name.  It is bad practice
  2480.           to leave object names blank although it is harmless.  As with all
  2481.           text items, you  can also  hit F6  and use the  Full Screen  Text
  2482.           Editor, but names are short so typing is easier.
  2483.  
  2484.           Anytime  you change  an object name,  that change  is immediately
  2485.           reflected throughout the story.  You  never have to go around the
  2486.           editor changing each occurrence of the  name wherever it is used.
  2487.  
  2488.  
  2489.           38
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.           Figment User's Guide                             The Story Editor
  2498.  
  2499.           You can duplicate names, but it is bad practice.  Also names that
  2500.           only partially duplicate existing names  can cause some confusion
  2501.           for inexperienced players.   If you  have two objects, one  named
  2502.           "Red Ball"  and the other named  "Blue Ball" and the  player says
  2503.           "Take ball.", the system responds with  the first ball found, red
  2504.           or blue.
  2505.  
  2506.           Avoid punctuation in  names.   Names  like  "Mr. Johnson"  should
  2507.           omit  the  period since  that  will  be mistaken  for  a sentence
  2508.           terminator.  Upper/Lower case does not matter; use what you like.
  2509.  
  2510.  
  2511.           2.   Creating and Deleting Objects
  2512.  
  2513.           If you want to  create new objects, hit the "+" key any time your
  2514.           cursor is in the matrix of object names.  The new object is added
  2515.           to the end of the matrix and  labeled "(Undefined)".  There is no
  2516.           special  order required of objects.   They can  be created at any
  2517.           time.   You  just make them  when you  need them.   You  can make
  2518.           several at one  time and fill  them in later.   Any object  named
  2519.           "(Undefined)" will not be written to  disk (See the discussion on
  2520.           File Management  later in  this document)  so it  will eventually
  2521.           disappear with any subsequent file write/read operation if you do
  2522.           not use it.  Thus new objects should be given  at least a working
  2523.           title if you want to keep them around.
  2524.  
  2525.           When the object list  exceeds the space available to  display the
  2526.           names, the list can be scrolled.  Simply move the cursor down any
  2527.           column of  names in  the matrix  of names.   When  you reach  the
  2528.           bottom row,  the matrix  begins scrolling  row by  row until  you
  2529.           reach the end.
  2530.  
  2531.           If  you create more objects than  can be displayed, you may think
  2532.           that nothing is  happening, but  scroll the name  matrix and  you
  2533.           will find  them at the end of  the list.  When you  can create no
  2534.           more objects, Figment beeps as you strike the "+" key.
  2535.  
  2536.           Deleting objects is slightly harder.  Advance the cursor until it
  2537.           is over the object you want  to delete and hit the "Delete"  key.
  2538.           This  is easy enough, but  it has created  some problems for you.
  2539.           Objects  are  the fundamental  building  blocks for  the stories.
  2540.           Many story elements refer to them.  Now that you have deleted the
  2541.           object, these other elements  have nothing to refer to.   Figment
  2542.           inserts a dummy  reference temporarily until  you can change  the
  2543.           reference.  You  will have to work through  the editor and change
  2544.           or  eliminate  these  references.    You  will  see  them  marked
  2545.           "(Deleted)" in object link lists, rule bases, and maps.
  2546.  
  2547.           A full discussion of deleting objects is deferred until after you
  2548.           have  an  understanding  of  the  full editing  process  and  the
  2549.  
  2550.                                                                          39
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.           The Story Editor                             Figment User's Guide
  2559.  
  2560.           aforementioned object references.  For now, we recommend that you
  2561.           consider re-naming  an object instead of deleting it.  All of the
  2562.           references in  other story  elements will  then  reflect the  new
  2563.           name.
  2564.  
  2565.  
  2566.           3.   Alphabetizing Objects
  2567.  
  2568.           It is convenient  to arrange the names in alphabetic  order.  You
  2569.           can  do that simply by  hitting the F5 key  when the cursor is in
  2570.           the name matrix.  You can do this anytime you add a new object or
  2571.           change an object name.
  2572.  
  2573.           You have  done all that you can  do at this level.   You can move
  2574.           down a level  and change the object's data with  Page-Down or you
  2575.           can return  to the Top Level Editor with  Page-Up.  When you move
  2576.           down a level, the  object's name remains lit in  reverse-video to
  2577.           remind you which object you are editing.
  2578.  
  2579.  
  2580.           4.   Player Object
  2581.  
  2582.           The first object  in the Stuff  List is the  Player Object.   You
  2583.           cannot delete this object.  The name of this object is changed to
  2584.           reflect  the  player's name  given  in  the  entry dialogue  when
  2585.           Figment is  started.  (See "Getting  Started".)  You are  free to
  2586.           edit this object,  but its  type remains "Player"  and cannot  be
  2587.           changed.  Neither can you alphabetize this object.  Regardless of
  2588.           the  player's  name,  this  object  never  moves  from  the first
  2589.           position.
  2590.  
  2591.  
  2592.           5.   Object Data Selection
  2593.  
  2594.           Page Down from  the Name Level  and you can  choose the data  you
  2595.           want to edit.  See the line labeled:
  2596.  
  2597.              "System Attributes   Text   User Attributes   Links"
  2598.  
  2599.           Your cursor lands on "System Attributes", and they are displayed.
  2600.           As you move the cursor left or  right, the various data types are
  2601.           displayed in turn.   If you Page-up from this level you return to
  2602.           the name level, and  the data type you selected is  displayed for
  2603.           each object as you cycle through the objects.
  2604.  
  2605.           Stop at the data type you want to edit and hit Page Down to enter
  2606.           that level.
  2607.  
  2608.  
  2609.           a.   System Attributes
  2610.  
  2611.           40
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.           Figment User's Guide                             The Story Editor
  2620.  
  2621.  
  2622.           This presents the attributes and flags required for the  built-in
  2623.           functions.  It also includes the user-defined object types.  Your
  2624.           cursor lands on the attributes.   Advance the cursor to the flags
  2625.           or the object types if you want to select them.  Hit page down to
  2626.           enter the level of your choice.
  2627.  
  2628.  
  2629.           (1)  Attribute Editing
  2630.  
  2631.           Each  attribute  is used  by  a particular  built-in  function so
  2632.           attributes control how  objects are  used.  Except  for the  Type
  2633.           attribute, you  need not worry  about any other  attributes until
  2634.           you use functions in the story that need them.  You can  also use
  2635.           the attributes in rules that you write:
  2636.  
  2637.                If {
  2638.                  Player  is linked to  Obj Sub-Typ  Money
  2639.                }...
  2640.  
  2641.           This would mean, "does the Player have anything valuable?"
  2642.  
  2643.           Changing the object's  Type attribute  from "Thing" to  "Feature"
  2644.           means  that people  cannot pick  it up  and  carry it  to another
  2645.           scene,  for example an object called "Weather"  is a feature of a
  2646.           scene.  As mentioned earlier, the  object type will not change on
  2647.           the Player Object.
  2648.  
  2649.           The  sub-type  is  used  mainly  with  objects  of  type "Thing".
  2650.           Objects  of sub-type  Armor  or  Weapon  are  used  in  fighting.
  2651.           Objects of sub-type container report their contents when they are
  2652.           open,  meaning  when their  "Open" flag  is  set to  read "OPEN".
  2653.           "Food" means the  object can be eaten.  "Strategic" means it is a
  2654.           weapon that functions at a distance; it can be shot.  Potions can
  2655.           be drunk.   Scrolls can be read.  "Goody" is a catch-all.  If you
  2656.           do not know  what something is, call  it a goody.   "Money" means
  2657.           the object has  monetary value.   Leave the sub-type alone  until
  2658.           some function requires you change it.  See Part III.
  2659.  
  2660.           Strength, health,  magic, size,  and weight  are numeric  values,
  2661.           scroll them up or down as desired.  They range from -127  to 0 to
  2662.           127.   Note that  they can  be set  to negative  values only  for
  2663.           objects of type "Thing", but read the  discussion on them in Part
  2664.           III before using negative attributes.   You will probably want to
  2665.           specify a health value for any character you create since this is
  2666.           important for conflicts.
  2667.  
  2668.           Note as well  the way that numeric values change  when they reach
  2669.           very high or very negative  quantities.  By the nature of  binary
  2670.           math, a signed 8 bit integer becomes -128 when you increment past
  2671.  
  2672.                                                                          41
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.           The Story Editor                             Figment User's Guide
  2681.  
  2682.           +127.
  2683.  
  2684.           The limit attribute specifies the maximum number of links you can
  2685.           make to other objects.  It is used, for example, to tell when the
  2686.           player  cannot take any  more things or  when you  cannot put any
  2687.           more things in containers.   This numeric quantity varies  from 0
  2688.           to 32,  the maximum links allowed.  It  is probably best to leave
  2689.           it at 16 until  you know you want more or less.   The editor will
  2690.           not let  you set  this value  lower than  the existing  number of
  2691.           links for the object.
  2692.  
  2693.           Some objects would never have objects linked to them, for example
  2694.           objects of  sub-type food.  This means the limit attribute can be
  2695.           used to mean  something else.   In  the case of  food, the  limit
  2696.           attribute means  the food value.   See the discussion on  food in
  2697.           Part III of this document.  Similarly, the limit means the number
  2698.           of  shots  available for  strategic  weapons.    Again,  you  are
  2699.           referred to Part III for more detail.
  2700.  
  2701.           To edit attribute data, advance through the attributes until  you
  2702.           arrive at the  one you  want to change.   Hold the  Up- or  Down-
  2703.           Arrow key down and the values will scroll.  Release the  key when
  2704.           you  reach the  value you  want.   Exit  this level  with Page-Up
  2705.           regardless of your cursor position.
  2706.  
  2707.  
  2708.           (2)  Flag Editing
  2709.  
  2710.           Flags are special (one-bit) attributes used to indicate the state
  2711.           of the object  or permission to modify that state.  The flags are
  2712.           changed both  by functions  in the  rule bases  and by  functions
  2713.           available to the  player during play.   During the course of  the
  2714.           story, the player, via the story commands and the author, via the
  2715.           logic, will be modifying the flags.
  2716.  
  2717.           The flags are edited in the  same manner as the attributes so  we
  2718.           need not repeat  those instructions.  A flag only  has two states
  2719.           that depend  on the type of  the flag: ON or OFF,  TRUE or FALSE,
  2720.           YES or NO, etc.  You see these displayed on the Flags line.
  2721.  
  2722.           Flags are grouped in  pairs.  The first  flag in the pair is  the
  2723.           permission flag  for the pair.   It indicates whether or  not the
  2724.           player should be allowed  to modify the second flag in  the pair.
  2725.           Permission  flags  are  set  to  read "YES",  meaning  permission
  2726.           granted  (the  player is  allowed  to  modify), or  "NO"  meaning
  2727.           permission denied.  Whenever permission is denied  and the player
  2728.           attempts  to modify a flag during play,  the message "You are not
  2729.           allowed." is returned.
  2730.  
  2731.           The Lock-permission flag  disables the story commands  "lock" and
  2732.  
  2733.           42
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.           Figment User's Guide                             The Story Editor
  2742.  
  2743.           "unlock".  You typically  want to leave them disabled  except for
  2744.           specific objects you want players to unlock.
  2745.  
  2746.           The Lock  flag controls  the story  commands "open"  and "close".
  2747.           Objects can  be locked  open or  locked closed.   Locked  objects
  2748.           return the message, "You can't.  It's locked." if you  attempt to
  2749.           open or close them during play.
  2750.  
  2751.           The  Open-permission  flag  also  controls  the  open  and  close
  2752.           functions during play.  Typically it is  used so the Designer can
  2753.           control the Open flag via rules.
  2754.  
  2755.           In  addition  to  reserving  the flags  for  exclusive  use,  the
  2756.           permission  flags   prevent   the  player   from   making   silly
  2757.           constructions such as opening a character.
  2758.  
  2759.           The Put-permission flag is used to indicate if the player can put
  2760.           an object ON this object.  The Put function also has a form, Put-
  2761.           in,  that is  used with  containers.   That form also  checks the
  2762.           permission flag.
  2763.  
  2764.           The Put flag itself is used to indicate if there is an object  on
  2765.           this object.   Some objects  are ambiguous and  can take  objects
  2766.           placed  in them or on them,  e.g. a chest of  drawers.  This flag
  2767.           resolves the  ambiguity later  when you attempt  to describe  the
  2768.           object.
  2769.  
  2770.           Further discussion of flags is deferred to Part III.
  2771.  
  2772.  
  2773.           (3)  User-Defined Object Types
  2774.  
  2775.           The  System Type attribute tells you  an object is a "Thing", but
  2776.           is it  an automobile  or an  airplane?   A Louis  the XIV  table?
  2777.           User-defined Object Types  let you add more descriptive labels to
  2778.           objects.  They are a more  advanced topic, however, and beginners
  2779.           need not be concerned about them.
  2780.  
  2781.           User types  are labels  that you  create separately.   They  have
  2782.           their  own editor to define  the labels as  part of the Parameter
  2783.           Editing  Screen  (see Parameter  Editing).   All  you do  here is
  2784.           scroll  through  the  list of  labels  that  you  defined on  the
  2785.           Parameter Editing Screen.
  2786.  
  2787.           You might for example set the object type to character, the  sub-
  2788.           type  to  container  (so  the  system  will report  the  object's
  2789.           possessions) and  add the  user type  label "Waiter".   Then  you
  2790.           could tell  if there  is a  waiter  in the  room with  a menu  or
  2791.           perhaps your dinner.
  2792.  
  2793.  
  2794.                                                                          43
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.           The Story Editor                             Figment User's Guide
  2803.  
  2804.           Editing  the  object's type  labels  is  easy.   From  the System
  2805.           Attribute level, advance  the cursor to  the title "User  Types".
  2806.           Hit Page Down.   Hit the "+" key to add new  type labels.  Scroll
  2807.           up  or down  to change  the  label.   Hit "Delete"  to  remove an
  2808.           unwanted label.   Advance through the  labels with the Left-  and
  2809.           Right-Arrows.  "Escape" or Page-Up exits this level.
  2810.  
  2811.           The order of the labels is not important.  An object either has a
  2812.           label or not.   The various functions merely test  for the label.
  2813.           You  will  notice that  the  system  will not  let  you duplicate
  2814.           labels.
  2815.  
  2816.           You have conditional and executional functions to test and modify
  2817.           the user type attribute in your rules.
  2818.  
  2819.  
  2820.           b.   Text
  2821.  
  2822.           Figment pulls the text from the object and uses it to build scene
  2823.           descriptions  or examination  reports.  The  text that  you write
  2824.           here merely represents  the initial  conditions for the  objects.
  2825.           The  rules that  you write  can replace  these descriptions  with
  2826.           different ones.  That is how the story changes with the  Player's
  2827.           actions.
  2828.  
  2829.           Descriptions come in two forms: Long and Short.  This is just for
  2830.           variety, and it  can be a  handicap during development trying  to
  2831.           maintain both descriptions so you might want to focus on  one and
  2832.           ignore  the  other.   Usually  this  means you  ignore  the brief
  2833.           description since the long description is the default mode.
  2834.  
  2835.           If you  do not  write a  description of  the object,  it will  be
  2836.           invisible during play.   This is legitimate, and often,  too many
  2837.           object   descriptions   make   the  resulting   composite   scene
  2838.           description too clumsy so you blank some  out.  When making a new
  2839.           object, you  usually write something  trivial like, "Here  is the
  2840.           x...", so you  can see  that you successfully  linked the  object
  2841.           into the story.  Later, you change the text to say something more
  2842.           appropriate to the story.
  2843.  
  2844.           The examination message is reported to  the command window during
  2845.           playback whenever the player examines an  object.  It is optional
  2846.           so you can ignore it until you need it.
  2847.  
  2848.           We described how  to edit  text earlier, but  remember that  they
  2849.           cannot exceed 2048 characters  in length, and they can  be edited
  2850.           by  typing over  them and/or  by hitting  F6 to  invoke  the full
  2851.           screen text editor.
  2852.  
  2853.           You have by now perhaps noticed that  long text is displayed as a
  2854.  
  2855.           44
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.           Figment User's Guide                             The Story Editor
  2864.  
  2865.           single line  followed  by "(...More)"  implying that  there is  a
  2866.           longer text  string than is actually  displayed.  If  you want to
  2867.           view the full string, hit F6.   This puts you in the  Full Screen
  2868.           Editor.  It  is assumed that  you want to  be here anyway  if the
  2869.           text is longer than a single line.  Hit "ESC" to exit the editor.
  2870.  
  2871.           Figment is unique  because it can  change the story depending  on
  2872.           who is  speaking.   The Player can  see another character  in the
  2873.           scene and change to that character and see the story through that
  2874.           character's  eyes.  We  call that  process "Changing  the Actor".
  2875.           Figment does that with Viewpoints.
  2876.  
  2877.  
  2878.           (1)  Viewpoints
  2879.  
  2880.           A  viewpoint is  a set  of  description and  examination messages
  2881.           written from the  perspective of a  character in the  scene.   We
  2882.           will call  them simply  views for  short.   If  you purchase  the
  2883.           optional graphics and music packages,  you can assign images  and
  2884.           music to the viewpoints as well.
  2885.  
  2886.           Any object can have up to four views, but it always has at  least
  2887.           one,  the  default  view a.k.a.  the  "Player's  Viewpoint".   As
  2888.           Figment builds the Scene Description during playback, it searches
  2889.           the scene  and each object in the scene  for views that match the
  2890.           current Actor.  If no view for the Actor is found for the object,
  2891.           it uses the text in the Player view for that object.
  2892.  
  2893.           You label each view  for an object (Except the  first, it's fixed
  2894.           to  "Player".)  as being  the viewpoint  of  some character.   Of
  2895.           course if you  do not have  three characters defined (beyond  the
  2896.           Player), you cannot have the four total views.
  2897.  
  2898.           Figment will not let  you duplicate viewpoints.   When you add  a
  2899.           new view, Figment  chooses the next  character from your list  of
  2900.           objects that does not duplicate an existing view for this object.
  2901.           You  can  then scroll  the character  names  to find  other legal
  2902.           candidates if you like.
  2903.  
  2904.           The character viewpoints  for your objects  need not be the  same
  2905.           viewpoints for  all objects  unless you want  them to be.   Also,
  2906.           many objects appear the same to  everyone so other viewpoints are
  2907.           not required; don't feel you have to  define viewpoints if you do
  2908.           not want to.
  2909.  
  2910.           The actor  currently defined in the story is shown at this level.
  2911.           If you have  changed the Actor  in the story,  you see that  name
  2912.           here.   Otherwise, it reads  "Player".  The  system automatically
  2913.           displays the "Actor view"  when you enter the text  level editor.
  2914.           Most of the time, this will be the Player View.
  2915.  
  2916.                                                                          45
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.           The Story Editor                             Figment User's Guide
  2925.  
  2926.  
  2927.           Editing the  viewpoints is  simple.   From the  word "Text",  hit
  2928.           Page-Down.  Your cursor lands on  the view number.  If there  are
  2929.           more than one view, you can  cycle through the views by scrolling
  2930.           up or down.  Add a new view by hitting the "+" key.  
  2931.  
  2932.           You can delete a  viewpoint by hitting the "Delete"  key when the
  2933.           cursor is positioned over the number of the viewpoint you want to
  2934.           delete.    Rules  can  refer  to  viewpoints in  the  "Copy  msg"
  2935.           function.  When  you delete  a viewpoint,  no effort  is made  to
  2936.           change such a  reference to the  deleted viewpoint.  They  simply
  2937.           become  ineffective since  there will  be no destination  for the
  2938.           copying.
  2939.  
  2940.           Advance the cursor to  label the view by scrolling  the character
  2941.           names until you  see the one you  want.  Advance onward  and edit
  2942.           the text in the usual manner.
  2943.  
  2944.           You  can change  the Actor  here  if you  like,  but remember  it
  2945.           changes the actor  for the story so  be sure to put it  back when
  2946.           you are through.  Advance the cursor to the Actor name and scroll
  2947.           the character names.  When a character name for the Actor matches
  2948.           a name for  a view, the text  on the screen  will change to  that
  2949.           view.  You  can Page-Up to the object name level and display this
  2950.           Actor's view of  each object  as you advance  through the  object
  2951.           names.
  2952.  
  2953.  
  2954.           c.   User-Definable Attributes
  2955.  
  2956.           Put the cursor over  the word "User Attributes".   The attributes
  2957.           for this object are displayed.
  2958.  
  2959.           The  original premise  for  user-defined  attributes  applies  to
  2960.           characters, but that does  not limit them only to  the characters
  2961.           or to human attributes.   We will begin by  discussing characters
  2962.           and expand the philosophy later to include other needs.
  2963.  
  2964.           Writers  are  taught  to develop  characters  along  three lines:
  2965.           physical,  psychological,  and spiritual.   Figment  groups user-
  2966.           definable attributes in  three categories called simply  Types 1,
  2967.           2, and 3.  You can establish the convention within your work that
  2968.           Type  1  attributes  are  the  physical  attributes  and  Type  2
  2969.           attributes  are the  psychological ones  etc.   Attributes  for a
  2970.           hypothetical character might be:
  2971.  
  2972.                Type 1                   Type 2              Type 3   
  2973.           Strength       50   Courage        10   Devotion         10
  2974.           Beauty         20   Bravery         2   Purity          -40
  2975.           Warts          10   Paranoia       33   Je ne sais quoi 100
  2976.  
  2977.           46
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.           Figment User's Guide                             The Story Editor
  2986.  
  2987.           Bad Smell      15   DrinksLikeFish 99   Chemistry        12
  2988.           Dresses Funny  10   Morals          0   Kind to Animals  23
  2989.                               Intellect     -10
  2990.  
  2991.  
  2992.           User-definable attributes are merely text labels that you  add to
  2993.           the system on a separate editing screen (See Links and Attributes
  2994.           later in this document).  As you  can see from the example above,
  2995.           the labels  can be  anything you  can think  of.   Once you  have
  2996.           defined them for  the system, you  can add  them to your  objects
  2997.           here by  scrolling those  previously defined  labels and  setting
  2998.           their value.  The value can range from +127 to -128.  
  2999.  
  3000.           You need not specify a value if you do  not want to.  It might be
  3001.           best to wait  and see what values  are required as you  test your
  3002.           story.
  3003.  
  3004.           User  Attributes  are used  in  character profiles  (See Profiles
  3005.           below).  These allow you to specify a decision matrix for special
  3006.           situations  or character  types.  You  also have  conditional and
  3007.           executional functions to test  and modify the attributes in  your
  3008.           rules.
  3009.  
  3010.           We said that  user attributes can  be used for inanimate  objects
  3011.           too.  Consider attributes for an object like an airplane:
  3012.  
  3013.                    Type 1                Type 2             Type 3   
  3014.           Engine         50   Turbulence     -10  Airframe       -32
  3015.           Fuel           10   Attitude        20   
  3016.                               Icing           10
  3017.  
  3018.           From this you  might surmise  the engines are  running fine,  the
  3019.           fuel's getting low, the turbulence is getting bad, and that crack
  3020.           in the wing has you worried.  Hope the de-icers hold out.
  3021.  
  3022.           Notice that the concept of  Physical, Psychological and Spiritual
  3023.           attribute  types  does not  apply when  you  are not  speaking of
  3024.           characters.  Hence we call them simply Types 1, 2, and 3.
  3025.  
  3026.           The purpose of the  three categories is so that  future functions
  3027.           can operate on the groups if desired.  For example, if you defeat
  3028.           an opponent in  battle, you might  win or acquire their  physical
  3029.           (Type 1) attributes,  but if  you fall  in love  you might  share
  3030.           (average) the spiritual (Type 3) attributes.  Currently the major
  3031.           activity  for  user  attributes  is  in Character  Profiles  (See
  3032.           Profiles below),  which  allow weight  factors to  be applied  to
  3033.           groups of attributes based on their type.
  3034.  
  3035.           Editing user attributes is easy.  Page Down to the attribute line
  3036.           you  want  to change.    Move the  cursor  left or  right  to the
  3037.  
  3038.                                                                          47
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.           The Story Editor                             Figment User's Guide
  3047.  
  3048.           attribute or  value you want to change.   Scroll as required.  If
  3049.           you do not  see an attribute you  want when scrolling, go  to the
  3050.           editing screen for Links and Attributes and define one.
  3051.  
  3052.           Page Down will move the cursor down and  add more attributes when
  3053.           you  hit the  end of the  list.   The delete key  will delete the
  3054.           attribute the cursor is pointing to.  The "+" key adds attributes
  3055.           without  moving  the cursor.   Page-Up  moves  the cursor  up and
  3056.           eventually exits this level.  "Esc" immediately exits this level.
  3057.  
  3058.  
  3059.           d.   Link Editing
  3060.  
  3061.           Links are associations between objects.  There are many ways that
  3062.           objects might be associated.  Figment lets you label the links to
  3063.           represent these  different associations.   For example,  consider
  3064.           the many ways that John and Mary might be related:
  3065.  
  3066.                Lovers
  3067.                Family - spouse, sibling, children, parents, cousins
  3068.                Classmates
  3069.                Work-related
  3070.                Church Group
  3071.                Tennis Match
  3072.                     .
  3073.                     .
  3074.                     .
  3075.  
  3076.           Knowing the type of relationship tells you more information which
  3077.           means you can write more complex  rules with link types, but  you
  3078.           are not required to  specify the type of link if  you do not want
  3079.           to.  It is  just an option to enrich the story.  The default link
  3080.           type is "Generic", meaning "no implied type", and you  may use it
  3081.           for all your links if you like.
  3082.  
  3083.           Even  if you know the relationship, you  do not know the strength
  3084.           of the  relationship.   Figment lets  you model  the strength  of
  3085.           relationships by including  an optional value.   You can test  or
  3086.           change this value from the story logic.
  3087.  
  3088.                If {
  3089.                  John  is linked to  Mary  by  Romance > 20
  3090.                }...
  3091.  
  3092.           The size of the number implies  the strength of the relationship.
  3093.           Negative values are  allowed.   Again, do not  be concerned  with
  3094.           values  for  the links  in the  early  going.   They  are another
  3095.           refinement for advanced users.
  3096.  
  3097.           Link types are defined on their own editing screen (See Links and
  3098.  
  3099.           48
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.           Figment User's Guide                             The Story Editor
  3108.  
  3109.           Attributes, below).  Here, you merely scroll those types you have
  3110.           defined previously.
  3111.  
  3112.           The most common use for links is associating objects with scenes.
  3113.           When the Player  says "take  the ball", Figment  breaks the  link
  3114.           from the  scene to the ball and  makes a link from  the Player to
  3115.           the ball.  The  story's Scene Description no longer  mentions the
  3116.           ball, because that  link is gone,  and the Inventory reports  the
  3117.           ball  in  the Player's  possession.    In truth,  nothing  really
  3118.           happens to the ball at all!  The system is wide open.  You  could
  3119.           link  everybody  to  the ball,  and  it  would  appear as  though
  3120.           everyone had the ball.
  3121.  
  3122.           The  method  for  editing  links  is  similar to  that  for  user
  3123.           attributes.
  3124.  
  3125.           The  limit attribute for the  object specifies the maximum number
  3126.           of links  you can  make up  to a  final limit  of 32.   (See  the
  3127.           discussion on links in Part III.)
  3128.  
  3129.           The system lets you make duplicate links, but duplicate links can
  3130.           confuse  your  logic.    Check  your  design and  correct  it  if
  3131.           necessary.
  3132.  
  3133.  
  3134.           I.   Scene Editor
  3135.  
  3136.           Once you  know how  to edit Stuff,  you know  how to  edit Scenes
  3137.           since  they  are the  same data  structure  and the  same editing
  3138.           style.
  3139.  
  3140.           Most attributes are ignored for scenes.   They are there only for
  3141.           the purposes of standardization with stuff.  You may  want to use
  3142.           the lock and open flags when you get  to writing rules.  They can
  3143.           be used safely.  Also, the limit attribute affects the link count
  3144.           as with the Stuff objects.
  3145.  
  3146.           Links are important to scenes.  Scenes are not much to look at by
  3147.           themselves.  They get their richness by virtue of the  stuff that
  3148.           you  link to them.   The order  in which you  create links can be
  3149.           important too since they affect the description paragraph for the
  3150.           Scene Description during play.
  3151.  
  3152.           When Figment composes  the Scene Description in  the Presentation
  3153.           Environment, it looks  at the link list for the scene to see what
  3154.           descriptions to use.  The first line of text comes from the scene
  3155.           object  itself,  its  description  line(s)  are  from  the  scene
  3156.           description  that  you see  when  you  display the  scene  in the
  3157.           editor.    Then it  gets any  feature  description text  from any
  3158.           feature stuff that  are linked to  the scene, then the  character
  3159.  
  3160.                                                                          49
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.           The Story Editor                             Figment User's Guide
  3169.  
  3170.           descriptions,  and  finally, any  thing  descriptions.   Thus the
  3171.           story's Scene Description flows  from what the scene is  like, to
  3172.           who is  in it,  and finally  to what you  can take  from it.   As
  3173.           events occur,  either by  your action  or the  story's, they  may
  3174.           alter  the  scene  so  the  description is  re-composed  and  re-
  3175.           displayed.  If no changes occur, then nothing happens.
  3176.  
  3177.           You are not  required to link the  Player Object into  the scene,
  3178.           but when you  do, the player's description is added  to the scene
  3179.           description just after the scene object's description.
  3180.  
  3181.           Since features automatically  come before any characters  anyway,
  3182.           you need not worry about  placing them in front of  characters in
  3183.           the scene's link  list.  You  need only get  the features in  the
  3184.           order in  which you want  them to  appear relative to  each other
  3185.           feature.  The first  feature description you want to  appear must
  3186.           have its object  name appear ahead  of any other  feature on  the
  3187.           scene's link list.   The same applies for the  characters and the
  3188.           things.  
  3189.  
  3190.           All this points  to the  importance of setting  an object's  type
  3191.           attribute when you create new stuff as we discussed earlier.
  3192.  
  3193.           That is all there is to editing  scenes.  We will use the  scenes
  3194.           to construct the Story Map.
  3195.  
  3196.  
  3197.           J.   Story Maps
  3198.  
  3199.           Earlier, we  recommended a methodology wherein we said you should
  3200.           make objects, make scenes, link the  scenes to their objects, and
  3201.           build  the  Story Map  so  we will  discuss maps  next.   Figment
  3202.           supports two  kinds of maps:  the Story Map  and the  Player Map.
  3203.           The Player Map is a luxury we can ignore for now.
  3204.  
  3205.  
  3206.           1.   About Maps
  3207.  
  3208.           The  map  ties the  scenes  together.   In  it, you  specify each
  3209.           scene's neighbors and what  direction to go to reach  them.  Maps
  3210.           usually are only edited  when you add new scenes to  the story or
  3211.           delete old ones  or when you want to change  the exit directions.
  3212.           You do not  edit the map just  because you modified the  scene or
  3213.           its name.  If you change a  scene's name, you immediately see the
  3214.           new name when you switch the screen to view the map.
  3215.  
  3216.           You are not obliged to  use all the scenes you have  defined.  In
  3217.           fact, scenes are  not really in the  story until you put  them in
  3218.           the map.   Scene-change  operations will  not work  in the  story
  3219.           until you make a map entry for your scene.
  3220.  
  3221.           50
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.           Figment User's Guide                             The Story Editor
  3230.  
  3231.  
  3232.           Story logic is very intimately related to the Story Map.  Figment
  3233.           sub-divides its rule base  into local rule bases for  every scene
  3234.           in the story  (technically map block in  the story).  It  makes a
  3235.           new local rule base every time you  create a map block.  (Careful
  3236.           - It also deletes it when you delete the map block.)
  3237.  
  3238.           Figment has one  very special feature to  its Story Map:  you can
  3239.           re-visit  old  scenes  and encounter  new  logic.    You are  not
  3240.           required to make your story  do this, but you can  do it.  It  is
  3241.           all in how you  make your map.  For purposes  of this discussion,
  3242.           we will  refer to any map  that does not make new  rule bases for
  3243.           old scenes as a simple map, and we will call a map that does make
  3244.           a new rule base for an old scene a complex map.
  3245.  
  3246.  
  3247.           2.   Editing Simple Maps
  3248.  
  3249.           To access the Story Map, move to the Top Level Editor  and change
  3250.           the screen with  the Up-Arrow key.  The screen  displays a matrix
  3251.           of scene blocks.  Each block is numbered and titled with the name
  3252.           of a scene we  want to use.  Note that if none of the scene names
  3253.           repeat in the block titles,  then it is a simple map.  Under each
  3254.           block title name  are the names  of the titled scene's  neighbors
  3255.           listed by  the compass  directions you  would use  to access  the
  3256.           neighboring scene.  
  3257.  
  3258.           We display the symbol "-*-" to mean that there is  no neighboring
  3259.           scene in that direction.  The player gets the message, "You can't
  3260.           go  that  way."  when  attempting  to  leave the  scene  in  that
  3261.           direction.
  3262.  
  3263.           Note that you  are not required to  return by the same  path that
  3264.           you arrived.   In the real world, if Scene  A is west of Scene B,
  3265.           then logically B is east of A.  This law does not hold true for a
  3266.           fictional world; you  can return to A from B by any direction you
  3267.           like.  If B does not refer to A, then it is a one way street from
  3268.           A to B with no return to A.
  3269.  
  3270.           Story maps  are easy to edit once you  recognize that all you are
  3271.           doing is  specifying the  exits from a  scene.  The  mechanics of
  3272.           editing are simple  (since by  now you are  an experienced  story
  3273.           editor):   Page-Down from the Top-Level, Right-Arrow to the scene
  3274.           you  want  to change,  Page-Down  to  the direction  you  want to
  3275.           change, scroll the scene names  then Right-Arrow to another scene
  3276.           or Page-Up until you are back to the Top-Level.  
  3277.  
  3278.           You can add  or delete map blocks with the "+" and "Delete" keys.
  3279.           The new block is titled "Not Defined".  When you create  more map
  3280.           blocks than will fit on a screen, you see nothing  happening, but
  3281.  
  3282.                                                                          51
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.           The Story Editor                             Figment User's Guide
  3291.  
  3292.           if you  advance  the cursor  to  the last  block  on the  screen,
  3293.           Figment will begin  scrolling blocks.   Continue advancing  until
  3294.           see your added blocks at the end of the list.
  3295.  
  3296.           The first block  in the  map is  the entry scene  for the  story.
  3297.           Thereafter, there is no mandatory order.   The first scene points
  3298.           to its neighbors who in turn point to their neighbors, etc.  Thus
  3299.           the second  block on  the screen  is not  necessarily the  second
  3300.           scene the player will see when playing the story.
  3301.  
  3302.           As you plan your map, remember that  if during play you return to
  3303.           a scene you  were in before, it will be in whatever condition you
  3304.           left it and  its rule bases will  also be in whatever  state they
  3305.           were when  you left  (rules that  switched off  do not switch  on
  3306.           again).
  3307.  
  3308.  
  3309.           3.   Complex Map Editing
  3310.  
  3311.           Complex maps are, naturally, harder.  Remember we mentioned  that
  3312.           the scenes are numbered in the map block titles?  This is crucial
  3313.           to an  understanding of  complex maps.   An  example helps  here.
  3314.           Retrieve our  demo and  bring the  map up  on the  screen in  the
  3315.           editor.  We attempt to reproduce this here in our book, but it is
  3316.           better to see  it in action.   Using the first three  blocks from
  3317.           that demo map as an example:
  3318.  
  3319.                    0 Mountains     1 Foggy Hollow 2 At the Beach
  3320.                N   1 Foggy Hollow  3 Dark Forest      -*-        N
  3321.                E    -*-              -*-              -*-        E
  3322.                W   4 Spooky Cave     -*-              -*-        W
  3323.                S    -*-            0 Mountains    1 Foggy Hollow S
  3324.                U    -*-              -*-              -*-        U
  3325.                D   2 At the Beach    -*-              -*-        D
  3326.                                                     
  3327.           This seems straightforward.  If we leave scene zero, the Mountain
  3328.           scene, going north we arrive at  scene 1, the Hollow.  Continuing
  3329.           northward from there, we end up at scene 3, the Dark Forest.
  3330.  
  3331.           What happens  if we change the title of  block 3 from Dark Forest
  3332.           to Mountains?   Do  this now  by scrolling  the  name using  your
  3333.           cursor control keys.  Now in  block 1, the record has changed  to
  3334.           indicate  the mountain scene  is simultaneously to  the north and
  3335.           the  south  of  the  Hollow.    But  note  that the  numbers  are
  3336.           different.
  3337.  
  3338.           Now imagine that we travel  this new path we have just  made.  If
  3339.           we  go south  from  the  Hollow, we  return  to  block zero,  the
  3340.           Mountain scene  as we left it and with  the rule bases as we left
  3341.           them.  If we go north from the Hollow, we enter the same Mountain
  3342.  
  3343.           52
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.           Figment User's Guide                             The Story Editor
  3352.  
  3353.           scene (object) but a different set of local rules.
  3354.  
  3355.           Now  assume  you edit  the block  titled  Hollow.   Position your
  3356.           cursor to the North direction record.  You find as you scroll the
  3357.           scene  names  that you  get  two  references to  the  scene named
  3358.           "Mountains".  You get "0 Mountains" and "3 Mountains".  Which one
  3359.           do you want?  Your choice  would be based on which rule base  you
  3360.           want.
  3361.  
  3362.           Thus it is important to note the numbers next to the  scene names
  3363.           and make sure as you design your map that you are pointing to the
  3364.           scene the  way that you want  to.  By now you  recognize that you
  3365.           are not specifying scene names in  map blocks, you are specifying
  3366.           other  map  blocks which  happened to  be  titled with  the scene
  3367.           names.  Map blocks do not really have names, just numbers.
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.  
  3374.  
  3375.  
  3376.  
  3377.  
  3378.  
  3379.  
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.                                                                          53
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.           The Story Editor                             Figment User's Guide
  3413.  
  3414.           K.   Story Rules (Logic Programming)
  3415.  
  3416.           Rules  form  the  logic that  drives  your  story,  and they  are
  3417.           undoubtedly the hardest part  of Figment for new users.   Figment
  3418.           can function with absolutely no rules - but it is very dull.  The
  3419.           more rules you can add, the more interesting your story  will be.
  3420.           In other words, you have to achieve critical mass.
  3421.  
  3422.           It  is very  easy  to get  in  over your  head  with rule  bases.
  3423.           Initial efforts seem  to go  well enough,  but you  soon reach  a
  3424.           point  where  doubling  the  size  of  the rule  base  more  than
  3425.           quadruples the complexity.  Do not  try to fight this phenomenon;
  3426.           it  is one of  those immutable facts  of life.   Our advice, when
  3427.           that happens, is  to split the  scene into two, smaller,  simpler
  3428.           scenes.
  3429.  
  3430.           Assume one case  where you put  thirty rules into  one scene  and
  3431.           another case where you put three rules into ten scenes.  In terms
  3432.           of story development, your  story has grown by the  same quantity
  3433.           in both cases,  but the work  will be much  easier in the  second
  3434.           case.  We say  this because beginners tend to overwork  the first
  3435.           scene and become  disillusioned when  they "hit the  wall".   You
  3436.           have  to work up to  it gradually if you  want to scale the wall.
  3437.           This is why we tell you to  make several scenes and a map  before
  3438.           you write rules.
  3439.  
  3440.  
  3441.           1.   Theory of Operation
  3442.  
  3443.           A  rule  specifies  actions  to  take  in the  event  of  certain
  3444.           conditions.   In  many cases,  the action  is simply  to print  a
  3445.           message  in  response  to  the  operator's command  creating  the
  3446.           illusion of  a dialogue.   The  "conditions" might  be a  certain
  3447.           player action  or the  state of  the many  object attributes  and
  3448.           associations.  If the conditions  hold true, the rule is  said to
  3449.           "fire",  meaning  its  specified  actions  are  performed.    The
  3450.           collection of all rules is called the Story Logic.
  3451.  
  3452.           Figment divides the logic  four ways into global and  local logic
  3453.           and pre-command  and post-command  logic.   Pre-command logic  is
  3454.           concerned  with  a  specific  action.     Post-command  logic  is
  3455.           concerned with  the effects of  any action.   This allows  you to
  3456.           make a "logic sandwich" that surrounds any action:
  3457.  
  3458.                >Take the Booby Trap
  3459.                     [test for "take" and locked Booby Trap]
  3460.                It doesn't look safe to me, but ok if you say so.
  3461.                     [command proceeds]
  3462.                You take the Booby Trap.
  3463.                     [test  for  possession of  locked  Booby Trap
  3464.  
  3465.           54
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.           Figment User's Guide                             The Story Editor
  3474.  
  3475.                     then kill player and print message]
  3476.                Some people go out  with a bang.  Others go  out with a
  3477.                wimper.  Lucky you.  You get to do both!
  3478.  
  3479.           Global logic applies to all scenes.  Local  logic applies only to
  3480.           the scene for which it was written.  
  3481.  
  3482.           Global and local logic are identical  in nature, but global logic
  3483.           is stored separately and used repeatedly in every scene.  Usually
  3484.           you write all logic for  the local scene.  When you find you want
  3485.           to use  the same rule  in a different  scene, you move it  to the
  3486.           global  storage area  with  cut  and  paste  operations.    Rules
  3487.           governing  the  behavior of  objects  of  type "Thing"  are  good
  3488.           candidates for global  rules because  the player  can carry  them
  3489.           from scene to scene.
  3490.  
  3491.           The logic is organized into sequences of rules called rule bases.
  3492.           There are four rule bases that apply when processing any comand: 
  3493.  
  3494.                Global Pre-Command  Rule Base
  3495.                Local  Pre-Command  Rule Base
  3496.                Global Post-Command Rule Base
  3497.                Local  Post-Command Rule Base
  3498.  
  3499.           The primary  reason  for  the  organization  is  to  improve  the
  3500.           performance, but it has the added  effect of cataloging the rules
  3501.           so you can find them easier, which is always good to do.
  3502.  
  3503.           We will  ignore global logic now since  the important distinction
  3504.           is between the pre- and post-command rules.  
  3505.  
  3506.           When a command  is given  during play, Figment  will process  the
  3507.           command  sufficiently to ensure the arguments  are legal and that
  3508.           the command syntax is  correct.  Any  mistake here will stop  the
  3509.           processing and yield some generic error message.  This means that
  3510.           none of your logic will be triggered by ordinary operator errors.
  3511.           This  error-check   ensures  that  the   command  will   complete
  3512.           successfully  unless you  have  written  some intervening  logic.
  3513.           Some common operator errors:
  3514.  
  3515.                >take the book
  3516.                You already have it.
  3517.                >take the ball
  3518.                There is no ball here.
  3519.                >drop the rock
  3520.                You don't have a rock.
  3521.  
  3522.           Once a  command is  determined to  be  legal, Figment  interrupts
  3523.           command processing and checks every rule  in the Global and Local
  3524.           Pre-Command Rule Bases to see if there is a rule for this command
  3525.  
  3526.                                                                          55
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.           The Story Editor                             Figment User's Guide
  3535.  
  3536.           action.  There  may be several such  rules or there may  be none.
  3537.           Any  rules  for  this  command  are  evaluated to  see  if  their
  3538.           conditions hold true.   If they hold true, the rule fires and its
  3539.           Command  Flag  is returned  which  enables or  disables continued
  3540.           command processing.   Rule processing  continues until all  rules
  3541.           that apply have been processed.
  3542.  
  3543.           Figment  returns  from rule  processing  to complete  the command
  3544.           execution.   It is at this  point that the normal  command action
  3545.           takes place if the command has not been disabled by a rule. 
  3546.  
  3547.           Summarizing:
  3548.  
  3549.                All Global and  Local Pre-Command Rules are  checked on
  3550.                every command to find applicable rules.
  3551.  
  3552.                All applicable rules for the action are evaluated.  (We
  3553.                do not quit early if a rule inhibits the command.)
  3554.  
  3555.                Rules  that  fire  return a  flag  to  indicate whether
  3556.                command processing should continue.  A  single negative
  3557.                flag will stop the command processing.
  3558.  
  3559.           We know the command will complete,  because it was pre-checked so
  3560.           Figment only needs permission from your  rules to proceed.  After
  3561.           all  this, the Post-Command rules  seem anti-climatic.  They just
  3562.           test  for changes  in  state meaning  links  or attributes  which
  3563.           changed since the last command completed.
  3564.  
  3565.           From all of  the above, you should recognize that all Global Pre-
  3566.           Command Rules are processed on  each and every command regardless
  3567.           of the scene  making it the most-used  rule base while the  Local
  3568.           Post Command Rules are processed only  on a successful command in
  3569.           the  current  scene  making  them   the  least-used  rule  bases.
  3570.           Minimizing  global pre-command rules  and maximizing  local post-
  3571.           command rules improves performance and makes debugging your story
  3572.           easier - if Figment ignores a rule base so can you.  Figment will
  3573.           ignore  the  post-command  rule bases  entirely  until  a command
  3574.           completes successfully.
  3575.  
  3576.           Most beginners over-use the pre-command rule  bases.  This is bad
  3577.           for several reasons: performance suffers,  capacity in rule bases
  3578.           is finite, and the rules are  too action-specific.  Probably half
  3579.           of these rules could be re-written as Post-Command rules creating
  3580.           a better  balanced, better  performing story  that is  more user-
  3581.           tolerant.  Observe.
  3582.  
  3583.           A pre-command rule is  concerned with an action.   A post-command
  3584.           rule is concerned with the result of an action.  Many times it is
  3585.           just  the result you want.   Imagine the object of  a scene is to
  3586.  
  3587.           56
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.           Figment User's Guide                             The Story Editor
  3596.  
  3597.           obtain a bank loan.  Bankers only need to see sufficient funds to
  3598.           repay a loan, and there are many ways to achieve that.  You would
  3599.           have to write  many pre-command rules  to consider them all,  but
  3600.           you only need to test a user-defined attribute for "Net Worth" or
  3601.           "Cash Flow" with a post-command rule to satisfy a banker.
  3602.  
  3603.           Most  interactive  fiction hinges  around  the player  making the
  3604.           correct actions.   This is  often unavoidable, but  the price  is
  3605.           that many stories are stuck until  the player discovers the right
  3606.           move.  It also does not tolerate  the player's innovations.  They
  3607.           often can think of things you did not.  You can avoid this by re-
  3608.           phrasing  the  rule  as a  post-command  rule  and  creating some
  3609.           literary  device  waiting  in  reserve  that  creates  the  right
  3610.           conditions if  the player  takes too  long to  perform the  right
  3611.           action.   This  is  really the  best of  both  worlds because  it
  3612.           tolerates beginners without penalizing experts.
  3613.  
  3614.            
  3615.           2.   Anatomy of a Rule
  3616.  
  3617.           It's  time  to study  the rule  itself.   Post-Command  rules are
  3618.           slightly simpler so go to the Top Level Editor and set the screen
  3619.           to display the Post-Command  Rule Base and follow along  with the
  3620.           discussion.   Page-down and you can scroll the rule number to see
  3621.           the different rules in the rule base.
  3622.  
  3623.           A rule  has three  major parts:  a conditional  clause (the  "IF"
  3624.           part), an executional clause (the "THEN"  part) and up to sixteen
  3625.           messages that can be  printed.  The conditional clause  has up to
  3626.           eight expressions  (typically tests of  links and flags),  all of
  3627.           which must hold  true in  order to fire  the executional  clause.
  3628.           The executional clause  can perform up  to eight operations  each
  3629.           time the rule fires.
  3630.  
  3631.           You can specify three  types of rules: IF, WHILE and  FOR.  Page-
  3632.           down from the rule number level.   Your cursor lands on the  rule
  3633.           type.   These types scroll under the cursor  when you hit the Up-
  3634.           Arrow key.
  3635.  
  3636.           The  IF-type rule will fire  only once.   It then switches itself
  3637.           OFF and is  never processed again for the remainder of the story.
  3638.           To the right of the rule number, you see an indicator which reads
  3639.           "Switched: ON (or  OFF)".   You can  reset this  manually if  you
  3640.           like.  Usually you check this indicator when debugging  to see if
  3641.           the rule fired.
  3642.  
  3643.           A WHILE-type rule is an IF-type rule that never switches off.  It
  3644.           will always fire  when its conditions  hold true.  The  indicator
  3645.           should always read "ON" for a WHILE clause.  (It might not if you
  3646.           have recently changed the type and forgotten to switch it back ON
  3647.  
  3648.                                                                          57
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.           The Story Editor                             Figment User's Guide
  3657.  
  3658.           so get in the habit of checking.)
  3659.  
  3660.           The FOR-type rule is very powerful (read tricky).  It is used for
  3661.           stunts.  A counter tracks the number of times that the conditions
  3662.           have held true.   You specify the start and stop  counts when you
  3663.           want the rule  to fire.  If you  specify the start count  to be 3
  3664.           for example,  then  nothing  happens  the  first  two  times  the
  3665.           conditions are  true.   You can also  specify a step  count which
  3666.           causes the rule  to fire every second or third time and so forth.
  3667.           This  can  be used  to make  messages appear  at intervals.   The
  3668.           indicator will show the rule has switched OFF when it reaches its
  3669.           specified stop count.
  3670.  
  3671.           The processor checks each rule but skips to the next rule when it
  3672.           sees the  rule has  been switched  off.   Rules should  always be
  3673.           switched on  at  the start  of  play for  the  scene.   You  may,
  3674.           however, want to switch off some rules in order to  debug others.
  3675.           The switch also  functions as a "soft  delete".  You can  keep an
  3676.           obsolete rule switched off and switch  it on later if you  decide
  3677.           to keep it.  There is no way to switch a rule on during play once
  3678.           it is switched  off.  You can,  however, simulate that effect  by
  3679.           testing a  lock flag  and having  another rule  change that  lock
  3680.           flag.   Thus a rule  can appear to be  asleep until the lock flag
  3681.           changes.  There are many examples of this in the demo.
  3682.  
  3683.           The Conditional Clause,  the Executional Clause and  the Messages
  3684.           represent separate editing levels that you enter with Page Down.
  3685.  
  3686.           The  rule editing screen is the most dynamic editing screen.  The
  3687.           rule expands and  shrinks as you  add and delete expressions  and
  3688.           messages.  The  expressions themselves also expand  and shrink as
  3689.           you change their functions, arguments, and  modifiers.  You often
  3690.           cannot display  all the messages  at once  so you  see a  rolling
  3691.           window of messages as you step through the message list.
  3692.  
  3693.           All of the conditional expressions must hold true for the rule to
  3694.           fire.  Experienced users  will recognize this as a  "Logical AND"
  3695.           and  immediately ask where  is the "Logical  OR"?   The answer is
  3696.           that each rule  in the rule  base is logically OR'd  meaning that
  3697.           Rule A fires, OR Rule B, OR Rule C, etc.  So if you want to OR an
  3698.           expression, copy the rule and change the conditional expressions.
  3699.           This  sounds  wasteful,  but  in  practice  if  you   change  the
  3700.           conditions, you probably will  change the executional expressions
  3701.           or the messages too which means you need a new rule anyway.
  3702.  
  3703.  
  3704.           3.   Expressions
  3705.  
  3706.           This  is an overview  of expressions and their  editing.  We will
  3707.           cover expression editing in full detail later.
  3708.  
  3709.           58
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.  
  3716.  
  3717.           Figment User's Guide                             The Story Editor
  3718.  
  3719.  
  3720.           We call each  line of  the conditional or  executional clause  an
  3721.           expression.   An  expression is  composed of a  function, objects
  3722.           that  act  as arguments  to  the  function, and  modifiers.   For
  3723.           example:
  3724.  
  3725.                While {
  3726.                  Player  is linked to  Ball  by Ownership
  3727.                }...
  3728.  
  3729.           This expression asks "Does the Player  own the ball?" (as opposed
  3730.           to merely having  it in his or her  possession.)  The conditional
  3731.           function in  this example is  "is_linked_to".  Its  arguments are
  3732.           Player and Ball, and  the term "by Ownership" acts as a modifier.
  3733.           Figment will  check to  see if  there is  a link  with the  label
  3734.           "Ownership"  in the Player's  link list.   If there  is, the rule
  3735.           fires.
  3736.  
  3737.           The syntax reference (see Conditional  Function Reference, later)
  3738.           indicates that the modifiers for "is_linked" are optional.   That
  3739.           means if you scroll them far enough, they blank out.  This yields
  3740.           the expression: "Player is  linked to Ball".  Figment  would then
  3741.           return "true" if  it found any link  to the ball in  the Player's
  3742.           link list regardless of type or value.
  3743.  
  3744.           We change  each portion of an  expression by scrolling.   Try it.
  3745.           Advance the cursor from the rule type to the first expression and
  3746.           hit Page-down.  The rule type lights in reverse video  to signify
  3747.           expression editing has been initiated.   Your cursor lands on the
  3748.           expression's function.   Scroll  the functions  and  stop at  the
  3749.           function  you  want to  use.   Notice  the entire  expression can
  3750.           change  depending  on the  function.   Some functions  need three
  3751.           arguments  while others need only one,  some have modifiers, etc.
  3752.           When  you have decided  on the function  move the cursor  left or
  3753.           right to set the arguments and the modifiers.
  3754.  
  3755.           We will cover the rule editing in detail later.
  3756.  
  3757.           You are not required to write  any conditional expressions at all
  3758.           if  you do not  want to.   An empty conditional  clause means the
  3759.           rule  is  always  true,  and  it  fires  every  time  the  player
  3760.           successfully completes a command.  Pre-command rules, by the way,
  3761.           cannot  have  empty conditional  clauses,  because they  test for
  3762.           action so you would be testing for no action which means it would
  3763.           become a Post-command rule.  (When you want a Pre-Command rule to
  3764.           fire on  any  command, you  can negate  the User-defined  Command
  3765.           Parser.)
  3766.  
  3767.           Neither are you required to write  any executional clause at all.
  3768.           Often you need  only the message  since it prints to  the command
  3769.  
  3770.                                                                          59
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.           The Story Editor                             Figment User's Guide
  3779.  
  3780.           window  automatically  so  it is  not  unusual  to  see an  empty
  3781.           executional clause.
  3782.  
  3783.  
  3784.           4.   Messages
  3785.  
  3786.           Interactive fiction requires delivering an appropriate message in
  3787.           response to  a  player's  actions so  shipping  text  strings  to
  3788.           various  destinations is  an  important activity  for executional
  3789.           functions.  Most  rules are used  primarily to hold messages  for
  3790.           delivery at the appropriate time.  The text that  you defined for
  3791.           your objects merely represents the initial condition.  Your rules
  3792.           will alter it during play by  copying messages to the description
  3793.           and examination strings.
  3794.  
  3795.           When the rule fires, its Current Message is printed automatically
  3796.           to the  Command Window where it appears  as though in response to
  3797.           the player's command.  You can  switch the automatic printing off
  3798.           when you want the message copied to a different destination.  For
  3799.           example,  the   message  can  be  copied  to   an  object's  Long
  3800.           Description which  will cause  the story's  Scene Description  to
  3801.           change.
  3802.  
  3803.           The  rule reports  its Current Message  number at the  end of the
  3804.           line  titled "Messages".   Usually this begins  as message number
  3805.           one.    The Current  Message number  does  not change  unless you
  3806.           change  it with  the  executional  function  "inc_message"  which
  3807.           increments  the  current message  number.   This  can be  used to
  3808.           change  the message  for  the next  time  the rule  fires  or for
  3809.           copying multiple messages to multiple destinations.  For example:
  3810.  
  3811.                While {
  3812.                  Player  is linked to  Ball
  3813.                } Then {
  3814.                  inc_message
  3815.                } Messages: 4 total  Switched On  Current Msg: 1
  3816.                1. Hey that's a neat ball.
  3817.                2. It's not yours. You better not keep it.
  3818.                3. I think it belongs to someone else.
  3819.                4. You're going to get in trouble.
  3820.  
  3821.           This rule prompts a warning message to the command line each time
  3822.           the player completes  a command  as long  as the  player has  the
  3823.           object named Ball.  With each move the message gets progressively
  3824.           ominous, because the Current Message  pointer is incremented each
  3825.           time the rule fires.  Eventually the last message is encountered.
  3826.           The inc_message function  cannot increment past the  last message
  3827.           so this rule will continue prompting the last message each time a
  3828.           command completes, meaning  the system will nag  ad nauseum until
  3829.           you drop the  ball.  Some  people won't want the  nagging message
  3830.  
  3831.           60
  3832.  
  3833.  
  3834.  
  3835.  
  3836.  
  3837.  
  3838.  
  3839.           Figment User's Guide                             The Story Editor
  3840.  
  3841.           that  keeps prompting.   In which case,  change the rule  type to
  3842.           "For  1 to 4 step 1".   Now the rule  shuts down after it reaches
  3843.           the fourth message.
  3844.  
  3845.           An executional function, "on_skill", is also provided that allows
  3846.           you  to deliver the appropriate message  relative to the player's
  3847.           skill  level so  you can  even tailor your  work to  beginners or
  3848.           experts.  There  are five  skill levels so  on-skill chooses  one
  3849.           message from a block of five.  You can have up to 16 messages and
  3850.           combine "inc_message" with  "on_skill" to  increment to the  next
  3851.           block of  five messages.   This can yield a  progression of three
  3852.           messages chosen according to the player's skill.
  3853.  
  3854.           Often you do  not want the  message to be printed  automatically.
  3855.           You can suppress the automatic printing with the ON/OFF switch on
  3856.           the Messages line so you can copy messages to object descriptions
  3857.           and examination  messages without  printing them  to the  command
  3858.           window.
  3859.  
  3860.  
  3861.           5.   A Rule Base in Action
  3862.  
  3863.           An example from the demo serves to illustrate a sequence of rules
  3864.           in action.  These  rules are all post-command rules  meaning that
  3865.           the player  must complete  a move  each time  the rule  is to  be
  3866.           processed  for  possible   firing.    In  other  words,  we  have
  3867.           programmed a  mini-drama to unfold  while the player  is fiddling
  3868.           with other things.   The entire  sequence discussed here takes  a
  3869.           total of 9 moves to complete.
  3870.  
  3871.           We add the character "Rushin' Bear" to the scene.  We want to put
  3872.           messages  to  its description  message, but  we will  clobber the
  3873.           existing message before it is displayed (Relatively harmless, but
  3874.           wasteful), so we  delay the message transfer one  move with a FOR
  3875.           clause that begins on the second move  after the bear is added to
  3876.           the scene:
  3877.  
  3878.                FOR 2 to 5 step 1 {
  3879.                  <scene>  is linked to  Rushin' Bear
  3880.                } THEN {
  3881.                  copy msg to  Rushin' Bear's  Long Description
  3882.                  inc_msg
  3883.                } Message 4 Total   Switched OFF
  3884.                 < 4 messages >
  3885.  
  3886.           By delaying  the start  of message  transfer to  the second  move
  3887.           after  the  bear   arrives,  we   allow  the  object's   original
  3888.           description to be displayed, then we  copy a message in its place
  3889.           and increment this  rule's message pointer to  this rule's second
  3890.           message.   Process repeats three more times.   The result is that
  3891.  
  3892.                                                                          61
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.           The Story Editor                             Figment User's Guide
  3901.  
  3902.           we  announce  the  bear's  pending  arrival  with a  sequence  of
  3903.           increasingly ominous messages.
  3904.  
  3905.           Once  done, we want the bear to initiate a fight so we unlock the
  3906.           bear after the fifth move:
  3907.  
  3908.                FOR 5 to 5 Step 1 {
  3909.                  * the scene *  is linked to  Rushin' Bear
  3910.                } THEN {
  3911.                  unlock  Rushin' Bear
  3912.                } Message  0 Total  Switched OFF
  3913.                  < no messages>
  3914.  
  3915.           This functions exactly like  an IF statement, but it is delayed 5
  3916.           counts.  We then  follow with a third rule (not shown here), a 4-
  3917.           count FOR statement that tests the Bear's lock flag and unleashes
  3918.           a barrage  of punishment forcing the player  to fight the bear or
  3919.           die.   The entire  Bear sequence  was triggered  by the  player's
  3920.           action.   (Extra Credit: Study the listing in  the demo.  Can you
  3921.           find the event that brought the Bear?  Wasn't that easy?)
  3922.  
  3923.           This sequence of only three rules  has driven a little mini-drama
  3924.           in the scene.  There can be many such dramas contained within the
  3925.           rule bases, all  of which progress  one notch with each  command.
  3926.           The player only sees the Scene Description change and the command
  3927.           responses appear after  typing a command.   The impression is  as
  3928.           though  the  different  dramas  played   out  in  the  scene  are
  3929.           progressing in parallel.
  3930.  
  3931.  
  3932.           L.   Editing Rule Bases
  3933.  
  3934.           Once you have practiced editing objects (stuff and  scenes), rule
  3935.           editing should come  as no great difficulty.   They are, by their
  3936.           nature, more complex than objects so there is a greater amount of
  3937.           work here.
  3938.  
  3939.           By now  you should recognize that if what you want to edit is not
  3940.           accessible with  the Right-Arrow key, it is  on a level lower and
  3941.           that  the Page-Down key will  reach that level.   You should also
  3942.           recognize that the editor will show you what you can edit on this
  3943.           level by holding the Right- or Left-Arrow down and watching where
  3944.           the cursor flies.
  3945.  
  3946.           Also the Home  key is used  extensively in expression editing  to
  3947.           give you more options.
  3948.  
  3949.  
  3950.           1.   Rule Base Editing
  3951.  
  3952.  
  3953.           62
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.           Figment User's Guide                             The Story Editor
  3962.  
  3963.           From the Top Level Editor,  select the appropriate screen  editor
  3964.           for Pre- or Post-Command Rule Base editing.  Hit Page-Down.  Your
  3965.           cursor  lands at  the rule number.   We  call this the  Rule Base
  3966.           Level, because you  are addressing the rule base as  a whole, not
  3967.           elements of the rule (Yes, the rule's switches  are at this level
  3968.           for convenience).
  3969.  
  3970.           You can display the different rules in the rule base by scrolling
  3971.           the rule number.  The label, "Rule #1 of 10" means there are  ten
  3972.           rules in  this rule base and you are  viewing the first one.  You
  3973.           can also delete, insert, cut or paste a rule at this point.
  3974.  
  3975.           Moving left, you can change the scene by scrolling the scene name
  3976.           to access the different rule bases for each scene of the story or
  3977.           the global rule bases.  Moving right, you can change the switches
  3978.           for the particular rule currently displayed.
  3979.  
  3980.           Page-Up from this level returns you to the Top-Level Editor, also
  3981.           Escape.
  3982.  
  3983.  
  3984.           a.   Adding/Deleting Rules
  3985.  
  3986.           Rules can  be added  or deleted  with the "+"  and "Delete"  keys
  3987.           respectively.   Try adding a new rule now  and note that the rule
  3988.           count changes.   The new  rule has been added  to the end  of the
  3989.           rule list and the screen now displays the new rule.
  3990.  
  3991.           You are probably wondering why the screen display did not change.
  3992.           The reason is that the "+"  function is actually a copy  function
  3993.           too.  It made a  copy of the rule you  were viewing when you  hit
  3994.           the  "+"  key and  displayed  the  copy, changing  only  the rule
  3995.           number.  Often you want to make a rule very similar to a rule you
  3996.           already have.   Display this rule with the  Up-Arrow key then hit
  3997.           "+".  The  new rule copy is  added to the end  of the list.   Now
  3998.           edit the new rule to adapt it to your needs.
  3999.  
  4000.           Note that this can also be used for re-ordering the rule sequence
  4001.           by copying  rules to the  end of the list  with the "+"  key then
  4002.           deleting the originals with the "Delete" key.  The order of rules
  4003.           can be  important when  rules are  dependent on  each  other.   A
  4004.           better way to change the order of the rule sequence is to use cut
  4005.           and paste operations.
  4006.  
  4007.           To delete a rule, scroll the rule number until you are displaying
  4008.           the rule you want to delete.  Hit the button labeled  "Delete" on
  4009.           your keyboard.  There  are no contingencies to be  concerned with
  4010.           as with object deletion.  Only the deleted rule is affected.
  4011.  
  4012.  
  4013.  
  4014.                                                                          63
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.           The Story Editor                             Figment User's Guide
  4023.  
  4024.           b.   Inserting Rules
  4025.  
  4026.           You can insert an empty rule anywhere in the sequence.  Scroll up
  4027.           the rule number until you are viewing the point where you want to
  4028.           insert  a  new  rule.   Hit  the  key  labeled  "Insert"  on your
  4029.           keyboard.  The rule you are viewing and the following  rules will
  4030.           be  moved back  in  the sequence  one  position and  you  will be
  4031.           viewing a new rule you can edit.
  4032.  
  4033.  
  4034.           c.   Cutting Rules - F7
  4035.  
  4036.           The "cut" function  is especially useful for  moving rules within
  4037.           the  sequence  and between  different rule  bases.   There  is no
  4038.           difference between local and global rule  bases, and you can move
  4039.           rules freely from one to the other.  There are subtle differences
  4040.           between pre- and  post-command rules, but the paste function will
  4041.           let you paste the wrong type, and you are expected to correct the
  4042.           differences (the first expression, and the enable switch).
  4043.  
  4044.           To  cut  a rule,  simply  scroll the  rule number  until  you are
  4045.           displaying the rule you want to cut and hit the F7 key.  The rule
  4046.           is  removed  from  the  sequence  and  held  for  a  later  paste
  4047.           operation.
  4048.  
  4049.           Repeated strikes  on F7 is comparable  to Delete.  Each  time you
  4050.           cut a rule,  the last rule in the cut buffer is over-written with
  4051.           only the final rule cut being saved for pasting.
  4052.  
  4053.  
  4054.           d.   Pasting Rules - Shift-F7, Alt-F7
  4055.  
  4056.           The "paste"  function presumes you  have cut a rule  prior to the
  4057.           paste operation,  and it will beep if there  has been no rule cut
  4058.           prior to the  paste operation.  If you are not  sure what rule is
  4059.           in the cut buffer, paste it anyway.   You can delete it or cut it
  4060.           out again with a single keystroke so no harm done.
  4061.  
  4062.           To paste a  rule, scroll the rule numbers until you arrive at the
  4063.           point  in the sequence  where you want  to insert the  rule.  Hit
  4064.           Alt-F7 to paste  the rule before this  rule or Shift-F7  to paste
  4065.           after this rule.   In either case, you will end up displaying the
  4066.           newly pasted rule.
  4067.  
  4068.           If you want to paste a rule to the first position  in a sequence,
  4069.           display rule number  one and hit Alt-F7.   If you want to  tack a
  4070.           rule onto the end of the sequence,  display the last rule and hit
  4071.           Shift-F7.
  4072.  
  4073.           Repeated pastes will insert repeated copies into the rule base.
  4074.  
  4075.           64
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.           Figment User's Guide                             The Story Editor
  4084.  
  4085.  
  4086.  
  4087.           e.   Changing Scenes (and Rule Bases) in the Editor
  4088.  
  4089.           To the left of the rule number is the scene name.  This indicates
  4090.           you are looking at the local  rule base for the scene (Map  Block
  4091.           actually)  in question.  Move the cursor over the name and scroll
  4092.           the name.  You have changed the display to display the local rule
  4093.           bases for  a different scene in  your map.  You  should recognize
  4094.           that they change in the order in which they are specified in your
  4095.           map (not the  order in which the  scenes are listed in  the Scene
  4096.           Editor).
  4097.  
  4098.           Every Map Block gets its own pair of rule bases.  When  you enter
  4099.           the editor,  you are looking  at the  rule bases for  the current
  4100.           scene (Map Block) in the story, but you can change the scene here
  4101.           and study other rule bases.  Note that this changes the scene for
  4102.           the story as well.  If you  hit F1, you find yourself viewing the
  4103.           story in a different scene.
  4104.  
  4105.           The Shift-F3  (write-all) function  in the  Top  Level Editor  is
  4106.           designed  to reset the story to  the starting scene.  Usually you
  4107.           hit this routinely  on your way  out of the  editor so any  scene
  4108.           changes here are harmless.  Sometimes, you are just poking around
  4109.           and do not want to save your changes so remember to put the scene
  4110.           back before you leave the editor.
  4111.  
  4112.           The scene change  function will not work  if you have not  made a
  4113.           map.   This discussion  assumes you  are working  on an  existing
  4114.           story which  has a  map defined.   If you  are working  on a  new
  4115.           story, you are stuck in scene zero until you define the map.  See
  4116.           the section on map editing for further details.
  4117.  
  4118.           A word of caution.  Note that there  is a number beside the scene
  4119.           name.    This  is  the number  of  the  map  block,  since as  we
  4120.           mentioned, it is  the map block that  you are changing.   See the
  4121.           section  on  the  Map Editor  for  full  details  of Map  Blocks.
  4122.           Remember  we  mentioned  that sometimes  you  re-use  scenes with
  4123.           different logic  by creating different map blocks titled with the
  4124.           same scene.  The number tells them apart.
  4125.  
  4126.  
  4127.           f.   Global Rule Bases
  4128.  
  4129.           Global rule bases appear in every way identical to the local rule
  4130.           bases.  To access them  for editing, simply move the  cursor over
  4131.           the scene name and  scroll up or down until the name "Pre-global"
  4132.           or "Post-global"  appears.  Add and  edit the rules as  you would
  4133.           edit any  sequence.  Be sure to re-set  the scene name if you are
  4134.           returning to the Presentation Environment.
  4135.  
  4136.                                                                          65
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.           The Story Editor                             Figment User's Guide
  4145.  
  4146.  
  4147.  
  4148.           g.   Rule ON/OFF Switch
  4149.  
  4150.           Also at this level is  the aforementioned switch to turn off  the
  4151.           rule.  Many rules switch off during the course of play.   You can
  4152.           manually toggle this  switch by advancing  over to this item  and
  4153.           scrolling this  flag.   Continue advancing  and the cursor  wraps
  4154.           back around to the scene name and the rule number.
  4155.  
  4156.  
  4157.           h.   Listing Rule Bases
  4158.  
  4159.           The F4 key will  write the full rule base (either  Pre- or Post-,
  4160.           not both) for the current scene to a disk file where you can read
  4161.           it  at your leisure.   The  F4 key  is enabled  in the  Top Level
  4162.           Editor when the screen is displaying either the Pre- or the Post-
  4163.           Command rule editor.   Page up to the top line  on the screen and
  4164.           hit F4.  You just made a listing  file on your disk with the same
  4165.           name as the story  but with a ".LST" file extension.   Every time
  4166.           you hit F4,  the previous contents of  this file are deleted  and
  4167.           replaced  with the new  listing.  You  can exit with  F10 to read
  4168.           this file with the DOS command "type" or print it on your printer
  4169.           with the DOS "print" command.
  4170.  
  4171.           If  you change  the screen  (or change  the scene)  to display  a
  4172.           different rule base, then hit  F4 again, the same disk file  will
  4173.           be  re-used and  your last  listing  will be  lost.   (Call  it a
  4174.           "losting".)
  4175.  
  4176.           Shift-F4 generates  a listing  file for  all the  rule bases  for
  4177.           every map block, in effect, a full logic dump.  Take  care.  This
  4178.           can generate a  file 60% as large as the original story file.  If
  4179.           you  are tight  on disk  space,  you may  want to  swap diskettes
  4180.           before hitting Shift-F4.   Again,  this over-writes any  existing
  4181.           listing file.
  4182.  
  4183.           Listings are fully expendable, feel free  to delete them when you
  4184.           need to recover  disk space.   The file is automatically  created
  4185.           when you hit F4 if the file does not already exist.
  4186.  
  4187.           Note.   DOS installs a  print driver  routine the first  time you
  4188.           give the print  command after booting up.   This routine is  then
  4189.           left in memory waiting for any subsequent print requests.  If you
  4190.           have not printed anything  before you start Figment, and  you use
  4191.           F10 to  visit DOS  and do  your printing, you  will install  this
  4192.           print driver at a  memory location above the last  memory address
  4193.           that  Figment consumes.   Eventually,  you return to  Figment and
  4194.           quit completely to run another DOS  application.  If this program
  4195.           consumes more memory than Figment did, it runs afoul of the print
  4196.  
  4197.           66
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.           Figment User's Guide                             The Story Editor
  4206.  
  4207.           driver sitting in an  unusually high location in memory,  and you
  4208.           get the alarming message:
  4209.  
  4210.                Insufficient memory to execute program.
  4211.  
  4212.           The  only  way to  kill  this print  driver  is  to re-boot  your
  4213.           machine.  Hit reset.
  4214.  
  4215.           To avoid this problem, load the  print driver first by giving the
  4216.           print  command  with no  filename.    This loads  the  driver and
  4217.           reports to you that the print queue is empty.  Now start Figment.
  4218.           If you  use this feature  often, you may  want to create  a batch
  4219.           file so you will not forget.
  4220.  
  4221.  
  4222.           2.   Rule Level Editing
  4223.  
  4224.           Hit Page-Down from  the Rule  Base Level Editor  and your  cursor
  4225.           lands  at  the  Rule  Type.   Advance  the  cursor  and  it moves
  4226.           sequentially  to  the  Conditional  Expressions, the  Executional
  4227.           Expressions and  the Messages  where it  wraps back  to the  rule
  4228.           type.  These are separate editing levels, and you can access them
  4229.           by hitting Page-Down when the cursor is at these locations.
  4230.  
  4231.           Page-Up/Escape returns to the Rule Base Level Editor.
  4232.  
  4233.  
  4234.           a.   Rule Type
  4235.  
  4236.           You can scroll the rule type.   Notice the start, stop, and  step
  4237.           counts magically appear and disappear when  you set the rule type
  4238.           to FOR.  Notice if a rule is switched OFF that  changing the type
  4239.           does not automatically switch it ON.  You must do this manually.
  4240.  
  4241.  
  4242.           b.   Expression Editing
  4243.  
  4244.           Expression level editing is very similar for both the conditional
  4245.           and  executional  clauses  so  we  will describe  both  processes
  4246.           simultaneously.   There  is  only a  slight  variation in  format
  4247.           between the two expression types.
  4248.  
  4249.           When  you  enter  expression level  editing  with  Page-Down, the
  4250.           rule's type statement  or the  word "Then" lights  up in  reverse
  4251.           video to indicate the expression level  editor is enabled. If you
  4252.           do not  see this light, you cannot edit the expressions.  Figment
  4253.           will only beep as you attempt to scroll values.
  4254.  
  4255.           Continue hitting  Page-Down to  move down  to the  expression you
  4256.           want  to  change.     Page-Down   also  automatically  adds   new
  4257.  
  4258.                                                                          67
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.           The Story Editor                             Figment User's Guide
  4267.  
  4268.           expressions for  you when  you hit the  end of  the list up  to a
  4269.           maximum of eight  expressions per clause.   It then moves down to
  4270.           the newly added expression.
  4271.  
  4272.           Page-Up moves up the list and  finally exits the expression level
  4273.           editor whereupon the  reverse video returns to  normal signifying
  4274.           you have left expression editing.
  4275.  
  4276.           The "+" key automatically adds new  expressions to the end of the
  4277.           list, but it does not move into them.
  4278.  
  4279.           The Delete key deletes the expression the cursor is on.
  4280.  
  4281.           The   rule  display  automatically   expands  and   contracts  to
  4282.           accommodate newly added and deleted expressions.
  4283.  
  4284.           If the clause  is empty, it  reads "No Expressions", meaning  you
  4285.           must  add one.  Otherwise  Figment will beep  when you attempt to
  4286.           edit nothing.
  4287.  
  4288.           As you make changes  to the expressions, Figment re-computes  the
  4289.           line length to accommodate the various options you have selected.
  4290.           The  cursor  centers on  the  function phrase  or  the function's
  4291.           argument phrases.   It changes  position slightly  as you  change
  4292.           these phrases.  The  cursor can only be  an approximate guide  to
  4293.           say that you  are working on the  function or its arguments.   It
  4294.           cannot  indicate  all  the  possible  options at  each  location.
  4295.           Experiment with the  up/down arrow keys  and the Home key  to see
  4296.           what your choices are.
  4297.  
  4298.  
  4299.           (1)  Setting the Function
  4300.  
  4301.           When you  enter  expression editing,  your  cursor lands  on  the
  4302.           expression's function.  The editing operations that you can do on
  4303.           an  expression depend on the function so  this will be your first
  4304.           task.  Set the function you  want by scrolling the function names
  4305.           with the Up-Arrow key.
  4306.  
  4307.           You can  negate conditional expressions  by hitting the  Home key
  4308.           when the cursor is on a function.  The Home key is very powerful,
  4309.           but here it only serves to toggle negation on  or off.  (See data
  4310.           types below.)
  4311.  
  4312.           The editor will only scroll the functions that are legal for your
  4313.           context:  conditional functions  will only scroll  in conditional
  4314.           expressions, executional functions in executional expressions and
  4315.           story commands  in the  first conditional  expression  of a  pre-
  4316.           command rule.  No system-level functions (restart, restore, save,
  4317.           toggle, etc.) will be  seen in the expression editor  meaning you
  4318.  
  4319.           68
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.           Figment User's Guide                             The Story Editor
  4328.  
  4329.           are not allowed to write rules to inhibit or restrain them.
  4330.  
  4331.  
  4332.           (2)  Expression Argument Counts
  4333.  
  4334.           The editor varies the expression argument count according  to the
  4335.           function.  Some  functions require no arguments while  some allow
  4336.           several.  As you advance the cursor with the right-arrow key, the
  4337.           cursor skips  over each  argument position  and eventually  wraps
  4338.           back  to  the  beginning  of  the  expression  when  the  maximum
  4339.           allowable argument is passed.   Thus as you change  the function,
  4340.           the cursor will  make shorter or longer laps as you cycle it left
  4341.           and right.
  4342.  
  4343.           Some functions have different forms that use different numbers of
  4344.           arguments.  For example, you can say:
  4345.  
  4346.                If {
  4347.                  Player  does take  ball
  4348.                }...
  4349.  
  4350.                or
  4351.  
  4352.                If {
  4353.                  Player  does take  ball  from boy
  4354.                }...
  4355.  
  4356.           In such a case if you choose not to use the last argument, simply
  4357.           scroll up (or down) the last argument's name until it blanks out.
  4358.           The modifier will also disappear.
  4359.  
  4360.  
  4361.           (3)  Data Types - The "Home" Key
  4362.  
  4363.           Each function specifies  the legal data  types for its  arguments
  4364.           (see  the Command  Reference  sections) so  that  the editor  can
  4365.           inhibit mistakes  before they occur.   The "Home" key is  used to
  4366.           access different data types for the  function arguments.  It also
  4367.           serves  to  negate  conditional expressions  when  the  cursor is
  4368.           positioned over the function.
  4369.  
  4370.           Some  functions  allow  a wide  variety  of  data  types for  the
  4371.           function arguments while  others allow only  one.  You can  check
  4372.           the syntax in  the Command Reference  sections that follow.   You
  4373.           might find  it  easier just  to try  hitting the  Home  key.   If
  4374.           nothing  happens, the function  allows no other  options for data
  4375.           types at that location in the expression.  
  4376.  
  4377.           For  example, the function  "is linked to" tests  for a link from
  4378.           one object to another.   When making links, you  should recognize
  4379.  
  4380.                                                                          69
  4381.  
  4382.  
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388.           The Story Editor                             Figment User's Guide
  4389.  
  4390.           that scenes can  have links to  objects, but objects cannot  have
  4391.           links to  scenes.  The reason is that links imply "possession" or
  4392.           similar association.  Scenes have objects in them, but objects do
  4393.           not have  scenes in them.  Neither can  scenes be linked to other
  4394.           scenes.  Thus the "is linked to" function specifies its arguments
  4395.           as follows:
  4396.  
  4397.                <stuff or scene>  is linked to  <stuff>
  4398.  
  4399.           If you strike the Home key when the cursor is positioned over the
  4400.           first argument,  you can  change  to scrolling  scene names  from
  4401.           scrolling stuff names.   Another strike on the  Home key, and you
  4402.           are back to scrolling stuff names.  Scrolling, as always, is done
  4403.           with the up/down arrow keys.
  4404.  
  4405.           The significance of this is that you can access any scene name in
  4406.           many  functions,  but only  where  it is  legal  to do  so.   For
  4407.           example, you might want to specify scene names or directions when
  4408.           testing the "go" command:
  4409.  
  4410.                If {
  4411.                  Player  does go  North
  4412.                }...
  4413.  
  4414.                or
  4415.  
  4416.                If {
  4417.                  Player  does go  to Basement
  4418.                }...
  4419.  
  4420.  
  4421.           (4)  Arguments Specified by Attributes
  4422.  
  4423.           Some functions  allow  their arguments  to  be specified  by  the
  4424.           attributes Type and Sub-type.  For example:
  4425.  
  4426.                If {
  4427.                  Player  is linked to  obj sub-type Money
  4428.                }...
  4429.  
  4430.           This  would be read as: "If the  player is linked to an object of
  4431.           sub-type 'Money'..." meaning  "Does the player have  something of
  4432.           value?".
  4433.  
  4434.           To access the attributes, simply hit the Home key when the cursor
  4435.           is positioned over the  second object until you see  the sub-type
  4436.           attributes.  Scroll the  sub-type names until you see the one you
  4437.           want.
  4438.  
  4439.           When  this  expression  is  processed,  Figment will  search  the
  4440.  
  4441.           70
  4442.  
  4443.  
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.           Figment User's Guide                             The Story Editor
  4450.  
  4451.           Player's  possessions  until  it  finds  the  first  object  that
  4452.           qualifies.    It then  stores  this object's  name  (see pronouns
  4453.           below) for future use and reports true.
  4454.  
  4455.           The syntax guide for the function  lists which functions use this
  4456.           feature.
  4457.  
  4458.  
  4459.           (5)  Pronouns
  4460.  
  4461.           Whenever you  specify  arguments  to  functions  indirectly,  for
  4462.           example by their attributes, you create  a separate problem.  How
  4463.           do  you  refer to  them  later?   Figment  supports  some special
  4464.           pronouns for that purpose.  For example:
  4465.  
  4466.                If {
  4467.                  Player  is linked to  obj sub-type Money
  4468.                } Then {
  4469.                  Take  * the object *  from Player
  4470.                }...
  4471.  
  4472.           We display the  pronoun "the object" between  asterisks to remind
  4473.           you that this is a pronoun.
  4474.  
  4475.           Pronouns remain defined until they are re-defined by any function
  4476.           that allows indirect  argument references.  This  allows pronouns
  4477.           assigned  in  conditional  clauses  to  be  used  in  executional
  4478.           clauses.  It is not wise nor recommended to stretch your luck and
  4479.           try to carry over pronouns between  different rules, but some may
  4480.           try.  In the right circumstances, it would work.
  4481.  
  4482.           Notice that in the  example above, the "take" function in  no way
  4483.           changes the definition of the pronoun.   It merely uses it.   The
  4484.           function "is linked  to" assigns  the pronoun, and  only when  it
  4485.           finds an object of sub-type "Money" in the player's possession.
  4486.  
  4487.           Note  also  that "is  linked to"  only  assigns pronouns  when an
  4488.           indirect argument reference is used.   When object names are used
  4489.           directly, the existing pronoun assignment remains unchanged:
  4490.  
  4491.                If {
  4492.                  Player  is linked to  Wallet
  4493.                } Then {...
  4494.  
  4495.           No need  for a pronoun  in this example.   We know  exactly which
  4496.           object is being referred  to so the pronoun "the  object" remains
  4497.           unaffected.
  4498.  
  4499.           Conditional  functions  might assign  pronouns  for any  of their
  4500.           three  possible  arguments.   When  they  assign  a pronoun,  the
  4501.  
  4502.                                                                          71
  4503.  
  4504.  
  4505.  
  4506.  
  4507.  
  4508.  
  4509.  
  4510.           The Story Editor                             Figment User's Guide
  4511.  
  4512.           following convention applies:
  4513.  
  4514.                An indirect reference in the first argument is assigned
  4515.                to the pronoun "the subject".
  4516.  
  4517.                The second argument assigns to  the pronoun called "the
  4518.                object"
  4519.  
  4520.                The third argument  assigns to the pronoun  called "the
  4521.                2nd object".
  4522.  
  4523.           Executional functions are commands that use an implicit subject:
  4524.  
  4525.                (you, Figment) take  object  from object
  4526.  
  4527.           An indirect reference in an executional function would not assign
  4528.           to the pronoun "the subject" since subjects are not used, but its
  4529.           first and second arguments would assign  to "the object" and "the
  4530.           2nd object" respectively.  Thus:
  4531.  
  4532.                ...} Then {
  4533.                  Take  obj sub-type Money  from Player
  4534.                  Add  * the object *  to Bank
  4535.                }...
  4536.  
  4537.  
  4538.           (6)  Cutting and Pasting Expressions
  4539.  
  4540.           You can cut an expression out  of the clause by hitting F7.   The
  4541.           cursor location  does not  matter.   It can  be  anywhere on  the
  4542.           expression.  The expression  can then be pasted back  with Alt-F7
  4543.           or Shift-F7 as described above for rules.
  4544.  
  4545.           When  you paste  an expression  of  the wrong  type in  a clause,
  4546.           Figment  quickly  converts  the  function  in  the  newly  copied
  4547.           expression  to  the  appropriate  type.   Figment  is  in  effect
  4548.           politely  telling  you  that  you  will  have   to  re-state  the
  4549.           expression  anyway.   Net  effect,  pasting  will not  look  much
  4550.           different from inserting for the majority of cases.
  4551.  
  4552.  
  4553.           (7)  Inserting Expressions
  4554.  
  4555.           The Insert key will insert a new  expression in the clause at the
  4556.           cursor location.   The  existing expressions  are bumped  back to
  4557.           open the gap in the sequence for the new expression.
  4558.  
  4559.           Note  when inserting  a  new first  expression  to a  pre-command
  4560.           rule's conditional clause,  the old expression moves  back and is
  4561.           transformed to an ordinary conditional expression.
  4562.  
  4563.           72
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.  
  4570.  
  4571.           Figment User's Guide                             The Story Editor
  4572.  
  4573.  
  4574.  
  4575.           3.   Message Editing
  4576.  
  4577.           Message  editing  is accessed  via Page-Down  when the  cursor is
  4578.           positioned  over  the word  "Message" on  the  screen.   The word
  4579.           "Message" lights up in  reverse video when you enter  the message
  4580.           editing level, and the cursor jumps  to the message switch.   Set
  4581.           the message display switch to "off"  or "on" by scrolling up with
  4582.           the Up-arrow key.   Advance to  the "Current Msg:" position  with
  4583.           the Right-arrow key.
  4584.  
  4585.           The Current  Message refers to the message that will be passed or
  4586.           displayed  the  next  time  the  rule  uses its  messages.    The
  4587.           executional function "inc_message", for example, will advance the
  4588.           Current Message pointer so  that the next message can  be passed.
  4589.           If you have  been playing the  story before entering the  editor,
  4590.           you might see it pointing to some  value other than 1.  You would
  4591.           set the Current  Message value whenever  you use a function  like
  4592.           the user-defined command parser ("say_cmnd")  that uses the first
  4593.           rule message by default.  Otherwise, you  probably do not have to
  4594.           change this value.
  4595.  
  4596.           Advancing one  more position (or  hitting Page-Down) puts  you in
  4597.           position for editing  the rule messages.  Page-Up/Down  moves you
  4598.           to the appropriate message for editing. You cannot edit a message
  4599.           where none  exists  so hit  "+" or  Page-Down when  there are  no
  4600.           messages  so that you  have a message  to edit.    Note  that the
  4601.           message total shown on  the screen updates as you  add and delete
  4602.           messages.  If it reports zero messages, you cannot edit a message
  4603.           until you add one.
  4604.  
  4605.           Page-Up/Down  behaves  in  a similar  fashion  as  for expression
  4606.           editing  so do "+"  and Delete.   Note that when  screen space is
  4607.           limited, the messages will  roll up/down in a window  as required
  4608.           to fit the available space.
  4609.  
  4610.           The F7  key will cut the message to the text buffer from which it
  4611.           can  be pasted  back  (wherever text  is  needed: rule  messages,
  4612.           object names, descriptions, etc.).
  4613.  
  4614.           Pasting behaves slightly different for rule messages than it does
  4615.           for object text strings.  The message the screen cursor points to
  4616.           is not replaced by the text in  the cut buffer.  Instead, the cut
  4617.           buffer  is inserted as  a message in  the list of  rule messages.
  4618.           Alt-F7 and Shift-F7 behave as they  do in expression editing, and
  4619.           repeated paste operations will generate repeated copies.
  4620.  
  4621.           The message itself is edited  in the normal manner for all  text.
  4622.           When the cursor  is positioned at  the start of the  message, you
  4623.  
  4624.                                                                          73
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.           The Story Editor                             Figment User's Guide
  4633.  
  4634.           can type in replacement text directly or you can hit "F6" and use
  4635.           the full-screen text editor to modify existing text.
  4636.  
  4637.           Page-Up exits the message  editing level and returns to  the rule
  4638.           editing  level.  When  the list  of messages  is long,  Escape is
  4639.           easier. 
  4640.  
  4641.           Be sure to leave the rule's current message indicator reading the
  4642.           message number you  want.  Typically  this is the first  message,
  4643.           but you can skip messages if you want.
  4644.  
  4645.           That is all there is  to editing rules.  You can exit  with Page-
  4646.           Up.  We now discuss the distinction between Pre- and Post-Command
  4647.           Rule Bases and then discuss the various rule functions in detail.
  4648.  
  4649.  
  4650.           M.   Pre-Command Rules
  4651.  
  4652.           Often you want  to intercept or  block a command from  executing.
  4653.           Pre-Command rules allow you to do that.
  4654.  
  4655.           Change  the  screen now  so you  can  study the  Pre-Command Rule
  4656.           Editor.  It  is very similar to the  Post-Command Rule Editor, by
  4657.           deliberate design so  that you will  have less editing to  learn.
  4658.           The major distinctions  are the addition of the  "Command" switch
  4659.           in the upper right corner of the screen and the first conditional
  4660.           expression.
  4661.  
  4662.           The Pre-Command rule differs from its Post-Command counterpart in
  4663.           that its first conditional  expression tests for the verb  in the
  4664.           player's command.   This  expression is  phrased as,  "If {player
  4665.           does [not] <verb>}".   The  remaining expressions,  if any,  test
  4666.           state variables as the Post-Command rule does.
  4667.  
  4668.           The  Pre-Command  Rule has  the  option of  enabling  the command
  4669.           (allowing  it  to  proceed)  or  disabling it  (blocking  command
  4670.           completion).   A blocked  command is  a failed  command, and  the
  4671.           Post-Command rules are not  processed.  Pre- and Post-  rules are
  4672.           often used  in combination.  A rule  in the Pre-Command Rule Base
  4673.           performs operations  that in  turn trigger  a rule  in the  Post-
  4674.           Command Rule Base.
  4675.  
  4676.           Pre-Command rules are rules tagged for a specific function.  Some
  4677.           functions turn this around and deliberately  use them as a source
  4678.           of user-defined messages.   (See Fight,  Shoot, Hit, Charm)   The
  4679.           User-Defined Command Parser is implemented as a Pre-Command Rule,
  4680.           but this is  the subject  of an  entire section of  this book  by
  4681.           itself.
  4682.  
  4683.  
  4684.  
  4685.           74
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.           Figment User's Guide                             The Story Editor
  4694.  
  4695.           1.   Modifiers in Pre-command Rule Expressions
  4696.  
  4697.           We have  seen conditional expressions with modifiers, and we have
  4698.           seen  how we can use them or omit them in our expressions when we
  4699.           want  to  be  specific or  general.    Many  story commands  have
  4700.           modifiers  too,  and you  have the  option  of testing  for these
  4701.           modifiers or ignoring  them.  When  you ignore the modifier,  you
  4702.           create a broader test case, and when you include the modifier you
  4703.           create a more specific test.
  4704.  
  4705.           For example, the expression:
  4706.  
  4707.                If {
  4708.                  Player  does give  bat
  4709.                }...
  4710.  
  4711.           does  not  care to  whom  the player  gives  the  bat, while  the
  4712.           following expression does:
  4713.  
  4714.                If {
  4715.                  Player  does give  bat  to Boy
  4716.                }...
  4717.  
  4718.           Only  a  few  commands  use  modifiers,  but  they  are  critical
  4719.           commands:
  4720.  
  4721.                take - from
  4722.                give - to
  4723.                put - in
  4724.                put - on
  4725.                shoot - with
  4726.  
  4727.           Modifiers  are  associated   with  the   last  argument  in   the
  4728.           expression.  If you have blanked this argument, then you will not
  4729.           see the modifier either.   Scroll the argument until you  see the
  4730.           object name you want.   The modifier will  appear along with  the
  4731.           argument name.  Figment will set a default modifier commonly used
  4732.           with the chosen  function.  Where  the function allows more  than
  4733.           one modifier (e.g. put),  you can change the modifier  by hitting
  4734.           the Home key and scrolling the modifier names.  Hit the  Home key
  4735.           again and you are back to scrolling object names.
  4736.  
  4737.  
  4738.           2.   Directions in Pre-Command Rules
  4739.  
  4740.           You can  test for specific directions  in the "go"  command.  The
  4741.           same philosophy applies as described above for modifiers.  If you
  4742.           do not specify a direction, then the rule will fire regardless of
  4743.           which direction the player goes.
  4744.  
  4745.  
  4746.                                                                          75
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.           The Story Editor                             Figment User's Guide
  4755.  
  4756.  
  4757.           3.   Negating Pre-Command Rules
  4758.  
  4759.           Negation is allowed for Pre-Command  Rule expressions.  The first
  4760.           conditional expression in a pre-command rule is phrased as, "If {
  4761.           Player   does   (command)...}"   or  "If   {   Player   does  not
  4762.           (command)...}".  The form changes when you hit the "Home" key. 
  4763.           A negated command  rule simply means that  the rule will  fire on
  4764.           any command  unless the  player gives  this command.   In  fact a
  4765.           negated "while" rule will fire every  time until the player gives
  4766.           the specified  command.  This  can be  very tedious  if the  same
  4767.           message  repeats  continuously  so  such  a rule  would  probably
  4768.           include extra conditional expressions to narrow the possibilities
  4769.           of its firing.
  4770.  
  4771.           Some functions  have alternate  forms and  the rule  can be  very
  4772.           specific.  Consider the case where the test is:
  4773.  
  4774.                If {
  4775.                  Player  does not take  Ball
  4776.                }...
  4777.  
  4778.           and the player says "take  the ball from the boy".  In this case,
  4779.           the player did  not say "take the ball" exactly so the rule would
  4780.           fire.
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.           76
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.           Figment User's Guide                             The Story Editor
  4816.  
  4817.           N.   Conditional Function Reference
  4818.  
  4819.           This section describes the  Conditional functions you can use  in
  4820.           your  rules.     The  next  section  describes   the  Executional
  4821.           functions.   Conditional functions  are used  in the  conditional
  4822.           part of a  rule.  They  are phrased slightly  different from  the
  4823.           executional functions in order to achieve a more natural style.
  4824.  
  4825.                If {
  4826.                  Player  is linked to  Ball
  4827.                } Then {...
  4828.  
  4829.           seems more natural than perhaps:
  4830.  
  4831.                If {
  4832.                  is linked  Player  Ball
  4833.                } Then {...
  4834.  
  4835.           Meanwhile, Executional functions are used in the command sense.
  4836.  
  4837.                ...} Then {
  4838.                  link  Romeo  to Juliet  by Romance  > 30
  4839.                  copy msg to Romeo's  Long Description
  4840.                }...
  4841.  
  4842.  
  4843.           1.   Does_Action
  4844.  
  4845.           Syntax    <Character>  does [not]  <action>
  4846.  
  4847.           This is the  primary conditional function for  pre-command rules.
  4848.           You  only  see  this function  when  you  are  editing the  first
  4849.           expression of a pre-command rule.
  4850.  
  4851.           The character can be  any character including the Player  and the
  4852.           Actor.
  4853.  
  4854.           The  action   is  any   legal  command   from  the   Presentation
  4855.           Environment, but  you will  not find  system-level commands  like
  4856.           "restore" or "restart" here.   The syntax for the  action follows
  4857.           the command syntax in the Presentation  Environment.  Only rarely
  4858.           is there a special option.  For example:
  4859.  
  4860.                If {
  4861.                  Actor  does go  anywhere
  4862.                } Then ...
  4863.  
  4864.           You will not  find the direction  "anywhere" in the "go"  command
  4865.           syntax.  It is a special implementation so you can write rules to
  4866.           inhibit all exits from the scene.
  4867.  
  4868.                                                                          77
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.           The Story Editor                             Figment User's Guide
  4877.  
  4878.  
  4879.  
  4880.           2.   Fit_Profile
  4881.  
  4882.           Syntax    <object>  does [not] fit profile of  <profile label>
  4883.  
  4884.           Compares a set of the object's  attributes to a weighted decision
  4885.           matrix of attributes.  See Profiles.
  4886.  
  4887.  
  4888.           3.   Have_Attribute
  4889.  
  4890.           Syntax
  4891.             <object> does [not] have attribute <attr label> [<>= value]
  4892.             <pronoun>
  4893.  
  4894.           Tests  the object  for the  specific user-defined  attribute.   A
  4895.           value can be  specified to  determine if the  attribute value  is
  4896.           less than, greater than, or equal to the specified value.
  4897.  
  4898.                If {
  4899.                  Actor  does have attribute  Wisdom  > 12
  4900.                }...
  4901.  
  4902.           Hit the  Home key  when the  cursor is  positioned near the  math
  4903.           symbols to change them.  You can blank the value entirely meaning
  4904.           you are only concerned with the attribute and not its value.  Hit
  4905.           the Home key until the value blanks out.
  4906.  
  4907.  
  4908.           4.   Is_dead
  4909.  
  4910.           Syntax: <character> is [not] dead
  4911.  
  4912.           Use this in conflicts to test for the defeat of characters.  When
  4913.           an opponent dies  in a  conflict it is  probably the Player  that
  4914.           killed them.  When Players die in a conflict, it is not clear who
  4915.           killed them since  there can  be multiple opponents.   This  will
  4916.           tell when the  Player is dead, but  it will not tell  you who did
  4917.           the deed.
  4918.  
  4919.           There is also a special case where you want to use this function:
  4920.  
  4921.                If {
  4922.                  Player  is dead
  4923.                } Then {
  4924.                  Kill  Player
  4925.                } ...
  4926.  
  4927.           This seems especially vindictive, but Figment is always trying to
  4928.  
  4929.           78
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.           Figment User's Guide                             The Story Editor
  4938.  
  4939.           recuperate Players when their health is failing.  If this healing
  4940.           process  coincides  with  the  death   blow,  Players  appear  to
  4941.           resurrect.  This rule,  however, seals their fate.  It also gives
  4942.           you an opportunity for some parting words.
  4943.  
  4944.           It is probably wise to put  such a rule in the Post-Command  Rule
  4945.           Base for any scene where a conflict can occur.  You can put it in
  4946.           the Global  Post-Command Rule  Base, but  if you want  customized
  4947.           messages for every situation, you will  have to paste it into the
  4948.           local rule bases.
  4949.  
  4950.  
  4951.           5.   Is_linked_to
  4952.  
  4953.           Syntax
  4954.             <object> is [not] linked to <object> [by link-type] [<>=value]
  4955.             <pronoun>                   <obj type>
  4956.                                         <obj sub-type>
  4957.                                         <pronoun>
  4958.                                         <obj user-type>
  4959.  
  4960.           Looks  for a reference to object-2  in object-1's link list.  The
  4961.           type and value are  optional.  They are ignored if  they are left
  4962.           blank.  Some examples:
  4963.  
  4964.                If {
  4965.                  Boy  is linked to  ball
  4966.                  Romeo  is linked to  Juliet  by Romance  > 12
  4967.                  John  is linked to  Mary  by Marriage
  4968.                  John  is linked to  House  by Mortgage  > 100
  4969.                }...
  4970.  
  4971.           Blank  the value  by  hitting the  Home  key when  the cursor  is
  4972.           positioned near the value.
  4973.  
  4974.           The link type blanks when scrolled with the Up/Down-arrow keys to
  4975.           the end of the link type list.
  4976.  
  4977.           The different object types  are accessed by hitting the  Home key
  4978.           then scrolling to the desired item.
  4979.  
  4980.           You  can test  for  links  to object  types  or  sub-types.   For
  4981.           example:
  4982.  
  4983.                If {
  4984.                  Player  is linked to  obj sub-type Money
  4985.                }...
  4986.  
  4987.           Read  this as, "If  the Player is linked  to something whose sub-
  4988.           type attribute  is 'Money'...",  meaning, "Does  the Player  have
  4989.  
  4990.                                                                          79
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.           The Story Editor                             Figment User's Guide
  4999.  
  5000.           anything valuable?".   This loads  the pronoun "*  the object  *"
  5001.           with the name of the valuable object  found, and you can use this
  5002.           pronoun in a later expression in the rule:
  5003.  
  5004.                If {
  5005.                  Player  is linked to  obj sub-type Money
  5006.                } Then {
  5007.                  take  * the object *  from  Player
  5008.                }...
  5009.  
  5010.           Strike the Home key when the cursor is positioned over the second
  5011.           argument, and you can scroll type names.  Strike Home again,  and
  5012.           you can scroll sub-type names.  Hit Home again, and you  are back
  5013.           to scrolling stuff names again.
  5014.  
  5015.           Another example:
  5016.  
  5017.                If {
  5018.                  Player  does give  Flowers  to  Juliet
  5019.                  Player  is linked to  Juliet  by Romance  > 20
  5020.                } Then {
  5021.                  Link  Juliet  to  Player  with Romance  20
  5022.                } Message  1 Total  Switched: ON  Current Msg: 1
  5023.                1. Gosh, @Player, I didn't know you cared.
  5024.  
  5025.  
  5026.           6.   Is_locked
  5027.  
  5028.           Syntax:   <object>  is [not] locked
  5029.  
  5030.           This function tests the object's lock flag to see if it is ON, in
  5031.           which case, the function  is said to be TRUE and  the rule fires.
  5032.  
  5033.                If {
  5034.                  Bear  is not locked
  5035.                } Then {
  5036.                  change  Player's  Health  -2
  5037.                } Message  1 Total  Switched: ON
  5038.                1.   Boy these bears  get mean when  you chain 'em up  don't
  5039.                     they?
  5040.  
  5041.  
  5042.           7.   Is_open
  5043.  
  5044.           Syntax:   <object>  is [not] open
  5045.  
  5046.           This function tests the object's "open"  flag similar to the lock
  5047.           flag.
  5048.  
  5049.  
  5050.  
  5051.           80
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.           Figment User's Guide                             The Story Editor
  5060.  
  5061.           8.   Is_type
  5062.  
  5063.           Syntax:  <Stuff>  is [not] <user type label>
  5064.                    <Scene>           <type attribute>
  5065.                    <Pronoun>         <sub type attribute>
  5066.  
  5067.           Used primarily to test for the presence of a user type label such
  5068.           as:
  5069.  
  5070.                If {
  5071.                  Player  is  user type Lawyer
  5072.                }...
  5073.  
  5074.           The type and  sub-type attributes are provided  for completeness.
  5075.           There  is no  crying  need for  them, but  they  might be  useful
  5076.           testing pronouns.
  5077.  
  5078.  
  5079.           9.   Is_wizard
  5080.  
  5081.           Syntax:   <Player>  is [not] wizard
  5082.  
  5083.           This function assumes you might want  to take some special action
  5084.           on behalf of skilled players:
  5085.  
  5086.                If {
  5087.                  Player  is wizard
  5088.                } Then {
  5089.                  unlock  Door
  5090.                  open  Door
  5091.                } Message  1 Total  Switched: ON
  5092.                1.   The Shaman knows  a Wizard  when he sees  one
  5093.                     and steps aside holding the door for you.
  5094.  
  5095.  
  5096.           10.  Probable_Event
  5097.  
  5098.           Syntax:   <value>%  [not] Probable Event
  5099.  
  5100.           This conditional function  will generate a random  action of your
  5101.           designation.  The rule would look like:
  5102.  
  5103.                While {
  5104.                  15%  Probable Event
  5105.                } Then {
  5106.                  go_to_map_block  7 Over the Cliff
  5107.                } Messages  1 Total  Switched: ON  Current Msg: 1
  5108.                1 A capricious wind blows you off the cliff.
  5109.  
  5110.           The percentage you specify determines  the probability, hence the
  5111.  
  5112.                                                                          81
  5113.  
  5114.  
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.           The Story Editor                             Figment User's Guide
  5121.  
  5122.           name  Probable  Event.   In  this  case,  the player  has  a  15%
  5123.           probability of  getting blown off the cliff each time the rule is
  5124.           checked.
  5125.  
  5126.           You may negate the function.  Something that  is 85% not probable
  5127.           is 15% probable.   You can  also just change  the percentage  and
  5128.           achieve the same effect.
  5129.  
  5130.           This rule will  drive you bats during  debugging or demonstrating
  5131.           your story even if  you specify the starting seed for  the random
  5132.           number  generator.  You may have  to switch the rule off manually
  5133.           in the editor.
  5134.  
  5135.  
  5136.           11.  Say_cmnd (User-Defined Command Parser)
  5137.  
  5138.           Syntax:   Player  does [not] say cmnd
  5139.  
  5140.           This is the User-Defined Command Parser.  It is only used in Pre-
  5141.           Command rules.   The function uses the first message  in the rule
  5142.           as a specification of word groups and the Boolean operations that
  5143.           should be  performed to  form a  sentence from  the word  groups.
  5144.           Punctuation should not  be used.   Differences in upper or  lower
  5145.           case letters is  ignored.  Rule messages  can be up to  2K bytes,
  5146.           but command sentences cannot exceed 80 characters.
  5147.  
  5148.           Example:
  5149.  
  5150.                If {
  5151.                  Actor  does say cmnd
  5152.                  <other conditions go here>
  5153.                } Then {
  5154.                  unlock  door
  5155.                  open  door
  5156.                  copy msg to  Door's  Long Desc.
  5157.                  inc_msg
  5158.                  copy msg to  Door's  Brief Desc.
  5159.                } Message  1 Total  Switched: On  Current Msg: 2
  5160.                1. (Abracadabra or Shazam or Hocus Pocus)
  5161.                2. With a rumbling groan, the mighty stone door swings open.
  5162.                3. The door stands open before you.
  5163.  
  5164.           A  simple  example  like  this  could  probably  be  solved  with
  5165.           synonyms, but not as well.  Synonyms  are global and act as extra
  5166.           handles  for  grabbing  built-in  functions.   In  this  case  if
  5167.           synonyms were used,  people would  be using magic  words to  open
  5168.           doors, windows, boxes,... everything.   User-defined commands can
  5169.           be local  to specific situations within  a scene so that  you can
  5170.           write unique rules.
  5171.  
  5172.  
  5173.           82
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.           Figment User's Guide                             The Story Editor
  5182.  
  5183.           Only  the first message  is tested.   The remainder are  left for
  5184.           your use.  This makes this rule  form unique in that you probably
  5185.           want  to leave the message pointer set  to the second message and
  5186.           not, as is usual, pointing to the first message.  If you left the
  5187.           rule  pointing  to message  number one,  the  effect would  be as
  5188.           though the command phrase were being echoed back to the player.
  5189.  
  5190.           More discussion on  Synonyms and the User-Defined  Command Parser
  5191.           can be found in Part III.
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.  
  5222.  
  5223.  
  5224.  
  5225.  
  5226.  
  5227.  
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.                                                                          83
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.           The Story Editor                             Figment User's Guide
  5243.  
  5244.           O.   Executional Function Reference
  5245.  
  5246.           The executional  functions are  used in  the second  part of  the
  5247.           rule.  You  can see these functions  when you scroll them  in the
  5248.           editor.
  5249.  
  5250.  
  5251.           1.   Assign_User_Type
  5252.  
  5253.           Syntax:  Assign <label>  to <stuff>
  5254.                                       <scene>
  5255.                                       <pronoun>
  5256.  
  5257.           Adds the  user-defined object  type label  to the  object if  the
  5258.           object does  not already have the  label.  See also  "Remove User
  5259.           Type".
  5260.  
  5261.  
  5262.           2.   Change
  5263.  
  5264.           Syntax:   Change <object>'s  <attribute>  <value>
  5265.  
  5266.           Changes an object's  attribute by  the specified value.   If  the
  5267.           value is negative, this is equivalent to subtracting the value. 
  5268.  
  5269.           Attributes are  signed 8  bit quantities,  meaning they can  hold
  5270.           numbers from -128  to +127.  Normally in computer math if you add
  5271.           too much to a positive integer, you "overflow" and get a negative
  5272.           number.  That is, 126 + 2 = -128  in 8 bit integer math.  Figment
  5273.           prevents overflow; it  just stops  when it reaches  the limit  so
  5274.           with the change function, 126 + 2 = 127.
  5275.  
  5276.                While {
  5277.                  Player  is linked to  Pharoah's Curse
  5278.                } Then {
  5279.                  Change  Player's  Health  -2
  5280.                } Messages  Switched: ON  Current Msg: 1
  5281.                1.  You feel your life force gradually slip from you.
  5282.  
  5283.           How  sad, somebody  has placed  a  curse on  the Player.    If no
  5284.           solution  is  found, the  Player's health  will slip  below zero,
  5285.           meaning the Player dies.
  5286.  
  5287.  
  5288.           3.   Change User-Attribute
  5289.  
  5290.           Syntax:  Change  <object>'s  <Type 1 Attribute>  <value>
  5291.                            <pronoun>   <Type 2 Attribute>
  5292.                                        <Type 3 Attribute>
  5293.  
  5294.  
  5295.           84
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.           Figment User's Guide                             The Story Editor
  5304.  
  5305.           Used  to  specify  a  value  to  add to  the  object's  specified
  5306.           attribute value.   If the object does not have the attribute, the
  5307.           attribute is added to the object and set to the value.  The value
  5308.           can be positive or negative.
  5309.  
  5310.           Attribute values are signed 8-bit integers meaning they  can vary
  5311.           from -128  to +127.  This function does  not permit overflow.  If
  5312.           you add 5 to 124 for example, the result will be 127.
  5313.  
  5314.           The  different attribute types  are accessed by  hitting the Home
  5315.           key.
  5316.  
  5317.  
  5318.           4.   Change_score
  5319.  
  5320.           Syntax:   Change_score  <value>
  5321.  
  5322.           Changes the player's score  by the amount specified.   Values can
  5323.           be positive or negative.
  5324.  
  5325.  
  5326.           5.   Close
  5327.  
  5328.           Syntax:   Close <object>
  5329.  
  5330.           Set the object's  "open" attribute  flag to read  "CLOSED".   The
  5331.           open, close, lock and  unlock functions are more powerful  in the
  5332.           rules than  they are for the player during  play.  The player can
  5333.           only perform these operations on objects whose sub-type attribute
  5334.           is set to "Container", and only when the object's permission flag
  5335.           lets  them.   The  story  designer,  however, can  perform  these
  5336.           operations on any  object.  This,  in effect, reserves this  flag
  5337.           partially for private use.
  5338.  
  5339.  
  5340.           6.   Copy_Msg_To
  5341.  
  5342.           Syntax:
  5343.             Copy msg to  <character>'s view of  <object>'s  Long Desc.
  5344.                                                 <pronoun>   Brief Desc.
  5345.                                                             Exam. Msg.
  5346.  
  5347.           This  function copies the rule's current message to the specified
  5348.           viewpoint  of  an object.   The  old  object text  is lost.   The
  5349.           message is also  printed to  the Command Window  unless the  rule
  5350.           specifies that printing is switched off.
  5351.  
  5352.           If  the message  you  are  copying is  of  zero  length, it  will
  5353.           effectively erase the destination string.
  5354.  
  5355.  
  5356.                                                                          85
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.           The Story Editor                             Figment User's Guide
  5365.  
  5366.           When editing  this function,  set the  destination object's  name
  5367.           first.  The system will then scroll the legal viewpoints for that
  5368.           object.    Since  many objects  have  only  the  default, Player,
  5369.           viewpoint,  the  viewpoint  scrolling  will  often be  frozen  at
  5370.           "Player's view".
  5371.  
  5372.           Copy_msg_to is commonly used in conjunction with repetitive rules
  5373.           (While and  For)  and  the Inc_msg  function  to  create  message
  5374.           progressions:
  5375.  
  5376.                For 1 to 4 by 1 {
  5377.                  <some conditions>
  5378.                } Then {
  5379.                  copy msg to Player's view of <object_name>'s  Long Desc.
  5380.                  inc_msg
  5381.                } Message  4 Total  Switched: OFF  Current Msg: 1
  5382.                <4 messages specified>
  5383.  
  5384.           In the example above, the rule type "While" could be used instead
  5385.           of the "For"  type, because Inc_msg stops at the  last message so
  5386.           the message  progression stops harmlessly.   Of course  a "While"
  5387.           could not  be substituted for  the "For" if  the   statement were
  5388.           changed to "For  2 to 8 by  2 {...", which slows  the progression
  5389.           down to every other count.
  5390.  
  5391.  
  5392.           7.   Go_to_Map_Block
  5393.  
  5394.           Syntax: go to Map Block  <Map Block>
  5395.  
  5396.           This executional function  will change scenes from  within a rule
  5397.           base.  When  a rule fires and  this function is encountered,  the
  5398.           scene will  change to the  new scene as specified  from the Story
  5399.           Map block number.
  5400.  
  5401.           Assume the pre-command rule  base for a given scene  includes the
  5402.           following rule:
  5403.  
  5404.                While {
  5405.                  Player  does eat  Magic Cookie
  5406.                } Then {
  5407.                  Go_to_map_block  3 Thru Looking Glass
  5408.                } ...
  5409.  
  5410.           This  function   behaves  differently   than  other   executional
  5411.           functions.    Normally  an  executional  function  just  executes
  5412.           immediately.   However, changing scenes also means  the rule base
  5413.           will change so a jump to a new scene in the middle of  processing
  5414.           the rule  base would also jump you to  the middle of another rule
  5415.           base.  Not good.  Moreover, we  want all the other rules to  have
  5416.  
  5417.           86
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.           Figment User's Guide                             The Story Editor
  5426.  
  5427.           their chance to vote on the action as they do with all commands.
  5428.  
  5429.           Therefore, this function is  designed to wait until the  pre- and
  5430.           post-command  rule  bases  are completed  before  jumping  to the
  5431.           specified scene.
  5432.  
  5433.           If you use this function in a pre-command rule as in  the example
  5434.           above, you  can control  it with  the "Enable"  switch.   If  you
  5435.           disable  the  function,  the  post   command  processing  is  not
  5436.           performed and the  jump to the new  scene is also not  performed.
  5437.           Other  pre-command  rules  can  also  be  testing  for  the "eat"
  5438.           command, and they  in turn  might disable the  "eat" command  and
  5439.           thereby inhibit the jump.
  5440.  
  5441.           If there  are multiple  rules checking  for a  command, you  will
  5442.           probably want this rule to be a "While" rule.  Otherwise, it will
  5443.           expire, but Figment will not jump to this scene, when other rules
  5444.           block the command.  When  the player's actions eventually satisfy
  5445.           the various rules involved,  the "while" rule can still  fire and
  5446.           trigger the jump to the new scene.
  5447.  
  5448.           When used in  a post-command rule,  Figment will allow the  post-
  5449.           command rule base to  complete before changing scenes.   Then, it
  5450.           changes  scene and cycles through the  post-command rule base for
  5451.           the new scene.   This method preserves the  appearance of a  "go"
  5452.           command.
  5453.  
  5454.           Notice that  you  are specifying  map  blocks, not  scene  object
  5455.           names.  If you are using a complex map  (see the User's Guide for
  5456.           a discussion of complex maps), you will get the correct map block
  5457.           that you want.
  5458.  
  5459.  
  5460.           8.   Inc_moves
  5461.  
  5462.           Syntax:   Inc_moves
  5463.  
  5464.           Used to  increment the  move count  when your  rule disables  the
  5465.           player's command and  you do not want  to give the player  a free
  5466.           move.   It increments  one move at  a time,  but you  can use  it
  5467.           several times in the same executional clause.
  5468.  
  5469.  
  5470.           9.   Inc_msg
  5471.  
  5472.           Syntax:   Inc_msg
  5473.  
  5474.           Increment  the  rule's  message  pointer  one message  after  the
  5475.           message  has been displayed  on the command line  or copied to an
  5476.           object (see also Copy_Msg_to).   Rules can have a total  of up to
  5477.  
  5478.                                                                          87
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.           The Story Editor                             Figment User's Guide
  5487.  
  5488.           16 messages, but  usually less.   Inc_msg will  never exceed  the
  5489.           existing total.   If Inc_msg were to execute five times while the
  5490.           message total was set  to 2, the second message would appear four
  5491.           times.
  5492.  
  5493.                For 1 to 5 Step 1 {
  5494.                  <scene> is_linked_to  Stage Coach
  5495.                } Then
  5496.                  inc_msg
  5497.                } Message 5 Total  Switched: ON  Current Msg: 1
  5498.                1.  You see a cloud of dust on the horizon.
  5499.                2.  Hmm.  It's the Wells Fargo Express.
  5500.                3.   You pull  your bandanna over  your face and  check your
  5501.                     pistol.
  5502.                4.  Thundering hooves drown out your pounding heartbeat.
  5503.                5.  You race from hiding and rob the stage.
  5504.  
  5505.  
  5506.           10.  Kill
  5507.  
  5508.           Syntax: Kill <character>
  5509.  
  5510.           Usually used by  the Story Designer  to terminate the player  and
  5511.           hence  the story  when  the player  attempts a  conspicuously bad
  5512.           action.   It  can also  be used  to defeat  the  conflict "escape
  5513.           clause" (see also is_dead).
  5514.  
  5515.  
  5516.           11.  Link_to
  5517.  
  5518.           Syntax:  Link  <object>  to  <object>  by <link_type> [<value>]
  5519.                          <pronoun>     <pronoun>
  5520.  
  5521.           Adds a reference to the second object in the first object's  link
  5522.           list.  The Link function creates a link of the specified type and
  5523.           sets the value to the specified value.  Example:
  5524.  
  5525.                ...} Then {
  5526.                  Link  Romeo  to Juliet  by Romance  12
  5527.                }...
  5528.  
  5529.           You cannot make duplicate links with  this function.  If the link
  5530.           of the  specified type  already exists, the  expression value  is
  5531.           merely added to the existing link value.
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.           88
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.           Figment User's Guide                             The Story Editor
  5548.  
  5549.           12.  Lock
  5550.  
  5551.           Syntax:   Lock <object>
  5552.  
  5553.           Set the object's lock attribute flag to "ON".
  5554.  
  5555.  
  5556.           13.  Msg_to_name
  5557.  
  5558.           Syntax:   Msg_to_name    <object>
  5559.  
  5560.           Copies the  rule's current message  to the object's  name thereby
  5561.           renaming the object.   This is  fully legitimate and often  done.
  5562.           Since Figment is designed to reference the current object name at
  5563.           all times,  your  rules  using  the old  name  are  automatically
  5564.           switched to the new name so they function as intended.
  5565.  
  5566.  
  5567.           14.  On_skill
  5568.  
  5569.           Syntax:   On_skill
  5570.  
  5571.           The on_skill function  sets the rule's message  pointer according
  5572.           to the  Player's current skill level.   There are  5 skill levels
  5573.           and 16 possible messages.  Thus the first message is used for the
  5574.           first (novice) skill level, and the second message for the second
  5575.           level, etc.  You are not  required to specify a message for  each
  5576.           level.  The  message pointer  then stops at  the highest  message
  5577.           specified.  For example the following rule generates one  message
  5578.           for novices and a  more informative message for more  experienced
  5579.           players:
  5580.  
  5581.                If {
  5582.                  Passage Door  is_locked
  5583.                } Then {
  5584.                  on_skill
  5585.                } Message 2 Total   Switched: ON  Current Msg: 1
  5586.                1. The sign reads: "Forbidden Zone".
  5587.                2. The sign reads: "Forbidden Zone", but you don't
  5588.                   believe everything you read do you?
  5589.  
  5590.           This function is special in that it must appear first on the list
  5591.           of  executional functions  for the  rule,  otherwise, it  will be
  5592.           ignored.
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.                                                                          89
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.           The Story Editor                             Figment User's Guide
  5609.  
  5610.           15.  Open
  5611.  
  5612.           Syntax:   Open <object>
  5613.  
  5614.           Set the object's "Open" attribute to  read "OPEN".  This function
  5615.           does not  concern itself  with the  status of  the object's  lock
  5616.           flag.
  5617.  
  5618.  
  5619.           16.  Remove_User_Type
  5620.  
  5621.           Syntax:  Remove  user type <label>  from <object>
  5622.                                                    <pronoun>
  5623.  
  5624.           If the  object in question  has the specified  user-defined type,
  5625.           then this function will remove it.  See also "Add User Type".
  5626.  
  5627.  
  5628.           17.  Take_from
  5629.  
  5630.           Syntax:   Take  <object>  from  <object>
  5631.  
  5632.           Removes a link entry in the second object's link list that refers
  5633.           to the first object.  If the  object is not linked to some  other
  5634.           object, it  is  out  of  play  until another  rule  links  it  to
  5635.           something.
  5636.  
  5637.                If {
  5638.                  <test conditions here>
  5639.                } Then {
  5640.                  take  Royal Jewels  from  Player
  5641.                  add  Royal Jewels  to  <scene_name>
  5642.                } ...
  5643.  
  5644.           The above example is equivalent to  the command "drop" except the
  5645.           player does not give the command.  Since no message is given, the
  5646.           player might not  even be  aware that it  happened, although  the
  5647.           object's description will now appear in the scene description.
  5648.  
  5649.  
  5650.           18.  Toggle_lock
  5651.  
  5652.           Syntax:   Toggle_lock    <object>
  5653.  
  5654.           Changes the object's  lock attribute flag from ON  to OFF or from
  5655.           OFF to ON.  See also "lock" and "unlock".
  5656.  
  5657.  
  5658.           19.  Toggle_open
  5659.  
  5660.  
  5661.           90
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.  
  5668.  
  5669.           Figment User's Guide                             The Story Editor
  5670.  
  5671.           Syntax:   Toggle_open    <object>
  5672.  
  5673.           Changes the object's "open" attribute flag to OPEN from CLOSED or
  5674.           from CLOSED to OPEN.
  5675.  
  5676.           See also the executional functions close and open.
  5677.  
  5678.  
  5679.           20.  Unlock
  5680.  
  5681.           Syntax:   Unlock    <object>
  5682.  
  5683.           Changes the object's lock attribute flag to OFF.
  5684.  
  5685.           See also the executional functions lock and toggle_lock.
  5686.  
  5687.  
  5688.  
  5689.  
  5690.  
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.                                                                          91
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.           The Story Editor                             Figment User's Guide
  5731.  
  5732.           P.   Player Maps
  5733.  
  5734.           Figment uses the  Story Map  to track scenes  and the  directions
  5735.           from those  scenes to  other scenes.   The  Player is  assigned a
  5736.           similar map to track map knowledge acquired as  a result of play.
  5737.           The Player Map tracks the scenes that the player has  visited and
  5738.           the directions used from those scenes.
  5739.  
  5740.           Initially, the player has  a very limited knowledge of  the Story
  5741.           Map.  Only the starting scene is known at the start of play(, but
  5742.           the  author can  specify  more).   When  the  player moves  to  a
  5743.           different scene, the player's knowledge of the new scene is added
  5744.           to  the  Player Map.    The  player only  acquires  the direction
  5745.           knowledge that he or she has actually used.  That is to say, just
  5746.           because you have visited a scene, does not mean that you know all
  5747.           the possible exits from that scene.
  5748.  
  5749.           The "go" command during playback can  refer to places (scenes) by
  5750.           name  and Figment  will compute  the path  to the scene  from the
  5751.           Player Map.   Similarly the "find"  command computes a path  to a
  5752.           scene that has the object the Player wants to find.
  5753.  
  5754.           Often, you want  to give the  Player foreknowledge of places  and
  5755.           things.  For example a story about a haunted house would probably
  5756.           speak of the public rooms: living  room, dining room, front hall,
  5757.           et cetera so you  want people to refer to them  naturally by name
  5758.           as in "go to the Living Room" or "find the coffee table".  On the
  5759.           other  hand,  you do  not  have to  tell  them  about the  secret
  5760.           passageway in the library.
  5761.  
  5762.           The Story Designer can edit the  Player Map to provide any amount
  5763.           of environmental knowledge as  required.  Editing the  Player Map
  5764.           is similar to editing the Story Map, but the Player Map can never
  5765.           be more than  the Story Map.   You are not really  constructing a
  5766.           map when  you are  editing the  Player Map.   You are  specifying
  5767.           values as "on" or "off" meaning the player knows or does not know
  5768.           this scene or direction.
  5769.  
  5770.           The  Player  Map screen  editor is  accessed  from the  Top Level
  5771.           Editor.  It is the screen following the Story Map.  You  move the
  5772.           cursor in the same  manner as with the Story Map,  but the values
  5773.           that scroll are restricted  to only those contained in  the Story
  5774.           Map.  Thus when you set a  value in the Player Map you are saying
  5775.           that  the player knows this scene  or a direction from this scene
  5776.           in the Story Map.
  5777.  
  5778.           You cannot add  or delete blocks  from the Player  Map.  You  are
  5779.           restricted to the same blocks as  defined by the Story Map.   You
  5780.           turn them  off  or on  by moving  the cursor  to the  appropriate
  5781.           location and  scrolling up  or down  with the  up-arrow or  down-
  5782.  
  5783.           92
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.           Figment User's Guide                             The Story Editor
  5792.  
  5793.           arrow keys.
  5794.  
  5795.           You cannot edit the directions from a scene until you specify the
  5796.           scene in the map block title.  (The Player cannot know  the exits
  5797.           from a scene  until the scene is  known).  If you  turn "off" the
  5798.           scene in the block  title, any directions you have  specified are
  5799.           also turned off.
  5800.  
  5801.           If you want the Player Map to be equivalent to the Story Map, you
  5802.           can dump the Story Map  to disk with F3, change the screen to the
  5803.           Player Map and  read the map  data into the  Player Map with  F2.
  5804.           This is a  handy technique since it  is often easier to  say what
  5805.           you don't want than it is to say what you do want.
  5806.  
  5807.           It is a good  idea to compare the  Story Map with the Player  Map
  5808.           you are making.  This is easy to do.   Go to the Top-Level Editor
  5809.           and switch between the two screens while studying one block  at a
  5810.           time.   You will notice  entire blocks or  exits from blocks that
  5811.           you will want to specify.
  5812.  
  5813.  
  5814.           Q.   Synonym Editing
  5815.  
  5816.           Figment allows  you to specify  synonyms for  both functions  and
  5817.           objects.  A  synonym simply allows  you to substitute any  phrase
  5818.           consisting of  any number of  words for  a Figment command  or an
  5819.           object name in the story.  It allows you for example to say:
  5820.  
  5821.                >cut the rope  or
  5822.                >pick up the rock
  5823.  
  5824.           instead of:
  5825.  
  5826.                >unlock the rope    or
  5827.                >take the rock
  5828.  
  5829.           In the examples above, you would  still write rules that test for
  5830.           the "unlock" and  "take" functions.   Rules will  never refer  to
  5831.           synonyms.  "Cut" is not actually a command.
  5832.  
  5833.           Synonyms take a  lot of the frustration out of stories, and their
  5834.           use is encouraged.
  5835.  
  5836.           Synonym  editing  is simple  and  straightforward.   By  now, the
  5837.           method should be easy.  
  5838.  
  5839.           Page-Down  from the Top Level Editor puts  your cursor at the top
  5840.           row of synonyms.   Page-Up and Down  again moves you up  and down
  5841.           the  rows  of synonyms.   Up-arrow  on  the function  scrolls the
  5842.           function names.  Left and Right-Arrow  moves between the function
  5843.  
  5844.                                                                          93
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.           The Story Editor                             Figment User's Guide
  5853.  
  5854.           and the phrase.  The phrase is a text string edited in the normal
  5855.           manner by re-typing or editing with F6.
  5856.  
  5857.           New synonyms  are created  by hitting  the "+"  key and  they are
  5858.           deleted with the "Delete" key.
  5859.  
  5860.           Synonyms are written  and read to the  story file so they  form a
  5861.           part of your  story.  They can  be dumped separately so  that you
  5862.           can  move them into new stories.   You will want  to do this.  If
  5863.           you get  used to  saying "look"  for "examine"  you will  quickly
  5864.           notice its absence in your new story.
  5865.  
  5866.           Object  Synonyms  are accessed  by  advancing the  cursor further
  5867.           right.  They are edited in the same manner as function synonyms.
  5868.  
  5869.           You can  have up to 64 synonyms, but  the screen can only display
  5870.           20 at a time so you when your cursor reaches the bottom line, the
  5871.           screen starts rolling the lines upward.  Thus you see a window of
  5872.           synonyms.
  5873.  
  5874.           Escape is a rapid exit from Synonym Editing.
  5875.  
  5876.  
  5877.           R.   Parameter Editing Screen 
  5878.  
  5879.           This screen editor includes three separate editors: the Parameter
  5880.           Editor, the Status Editor, and the Object Type  Editor.  From the
  5881.           Top  Level  Editor, Page-Down.   The  cursor  lands on  the title
  5882.           "Parameters".  You can  advance the cursor to the  titles "Status
  5883.           Editor" and "User Type Editor" to access those editors.
  5884.  
  5885.           There is also an indicator panel to  tell you how full your story
  5886.           is to  aid your planning.   This indicates the  number of objects
  5887.           used and the percentage of object capacity consumed.  The same is
  5888.           true for expressions and  rules.  This capacity refers  to vacant
  5889.           pointer capacity.
  5890.  
  5891.           Text strings, objects, rules and expressions are allocated memory
  5892.           dynamically when you create them so they compete for memory  on a
  5893.           first-come-first-served  basis.    Figment  then points  to  that
  5894.           memory space.  Therefore  even though there are  vacant pointers,
  5895.           there is no  real guarantee there  will be memory available  when
  5896.           you want to create these items.  If you write long  text strings,
  5897.           there will be less memory available so you must  settle for fewer
  5898.           objects, rules, and expressions (and hence the fewer text strings
  5899.           these engender).
  5900.  
  5901.           When you  run out of memory, all you can  do is start a new story
  5902.           as "Part II - The Saga Continues".  This is legitimate  since you
  5903.           must archive and  perhaps ship your  work, and in the  DOS world,
  5904.  
  5905.           94
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.  
  5912.  
  5913.           Figment User's Guide                             The Story Editor
  5914.  
  5915.           the lowest common  denominator is the 360 KB  floppy.  This means
  5916.           your work must break into pieces that fit the range of 250-350 KB
  5917.           which is what you get when you run out of memory in Figment (with
  5918.           640 KB installed).
  5919.  
  5920.  
  5921.           1.   Parameter Editor
  5922.  
  5923.           Parameter editing  allows you  to change  some fundamental  story
  5924.           parameters.   By now  you should  understand the  editing process
  5925.           enough  that we  can dispense with  discussions of  page-down and
  5926.           arrow keys and simply focus on the parameters themselves.
  5927.  
  5928.  
  5929.           a.   The Title
  5930.  
  5931.           The title is a text string that you provide.  You may use this to
  5932.           include your copyright  statement if you  like.  Be very  careful
  5933.           about changing anyone else's copyright statement.   It is illegal
  5934.           to distribute someone else's copyrighted story to people even  if
  5935.           you make no  money from the transaction.   If you heavily  modify
  5936.           someone else's story and attempt to copyright it as  your own, it
  5937.           forms what is known as a derivative work and distributing it  can
  5938.           still  be  illegal  regardless  of  whether  it  was for  profit.
  5939.           Consult your lawyer.
  5940.  
  5941.           The title with  its copyright  statement is written  to the  save
  5942.           file and  fulfills  the requirement  of  the copyright  laws  for
  5943.           embedding your copyright statement in the data files.  It is also
  5944.           displayed each  time the story  is retrieved, also  in compliance
  5945.           with the requirements of copyright law.  Most texts on copyrights
  5946.           say it is  good practice to make  a copyright statement early  in
  5947.           the development  process.  You  never know if  you might  want to
  5948.           publish it.
  5949.  
  5950.           The title message is allocated its own screen at the start of the
  5951.           story.  If  you define a title message, Figment  will pause after
  5952.           printing it and print the message:  "Strike any key to continue."
  5953.           The  intention is  that you will  define a  title with  perhaps a
  5954.           copyright statement, an  abstract or introduction, any  licensing
  5955.           or copyright statement, etc.
  5956.  
  5957.           The user's name is also requested in the title message processing
  5958.           whenever you include the word "@Get_User" in the title.   You can
  5959.           do this at the start of the title, and echo it back later in  the
  5960.           message with "@Full_name".   The name is parsed into  the @User[]
  5961.           names,  and the Player name is set  to @User[0], the user's first
  5962.           name.
  5963.  
  5964.           Usually during development, you  do not want to be  bothered with
  5965.  
  5966.                                                                          95
  5967.  
  5968.  
  5969.  
  5970.  
  5971.  
  5972.  
  5973.  
  5974.           The Story Editor                             Figment User's Guide
  5975.  
  5976.           user  name processing so  you omit  the keyword  "@Get_User" from
  5977.           your title.   Later when you  want to distribute  your story, you
  5978.           replace the keyword. 
  5979.  
  5980.  
  5981.           b.   Moves and Score
  5982.  
  5983.           The move count and the score can  be adjusted here.  The Shift-F3
  5984.           function automatically zeroes  them before  saving the data.  You
  5985.           can adjust the move count and score in order to modify  the skill
  5986.           level (displayed  here  for  convenience)  for  debugging  skill-
  5987.           dependent sequences.  The Move counter  must be greater than zero
  5988.           in order for  the skill level  to change, otherwise a  divide-by-
  5989.           zero error would occur.
  5990.  
  5991.  
  5992.           c.   Recuperation Parameters
  5993.  
  5994.           "Recup-int"  means  "recuperation interval".   When  the Player's
  5995.           health is  low, Figment restores the Player's  health slowly over
  5996.           time to  represent a healing  process.  Increasing  this interval
  5997.           slows the recuperation process while decreasing it speeds it up.
  5998.  
  5999.  
  6000.           d.   Food parameters
  6001.  
  6002.           "Food-cnt"  tracks the  current food  point status.   This  value
  6003.           increases as the player consumes food  and decreases one point at
  6004.           a time in  an interval  specified by "Food-dec-int".   Setting  a
  6005.           high food count and  a large interval will effectively  eliminate
  6006.           food concerns from your story if you would rather not bother with
  6007.           it.    Going  the  other  way  will have  your  player  consuming
  6008.           everything in sight in a desperate attempt to stay alive.
  6009.  
  6010.           Figment begins warning you when  the food count is getting  low. 
  6011.           "Food-msg-int"  specifies the  interval  between these  messages.
  6012.           The appropriate size would be:
  6013.  
  6014.                initial-food-count * food-dec-int / 5 = food-msg-int
  6015.  
  6016.           You can  always specify  other values  of course  which can  make
  6017.           Figment more or less of a food nag.
  6018.  
  6019.  
  6020.           2.   Status Editing
  6021.  
  6022.           The  status  banner displayed  at the  top  of the  screen during
  6023.           playback can be modified to display the parameters and attributes
  6024.           you want to use.  
  6025.  
  6026.  
  6027.           96
  6028.  
  6029.  
  6030.  
  6031.  
  6032.  
  6033.  
  6034.  
  6035.           Figment User's Guide                             The Story Editor
  6036.  
  6037.           The status banner is composed of  active elements that report the
  6038.           various parameters as  formatted text.   The various text  pieces
  6039.           are strung together as a single line of text.  Hit the "+" key to
  6040.           add a new element.  Hit the "Delete" key to remove an element.
  6041.  
  6042.           Scroll the parameters using the up- and down-arrow keys.  Hit the
  6043.           Home  key to access  a different data  type.  The  data types are
  6044.           arranged as follows:
  6045.  
  6046.                Story Parameters: Score, Moves, Current Scene Name
  6047.                Actor's System Attributes: Skill, Strength, Health, etc.
  6048.                Actor's Category I User Defined Attributes
  6049.                Actor's Category II User Defined Attributes
  6050.                Actor's Category III User Defined Attributes
  6051.  
  6052.           Repeated strikes of the Home  key will cycle the data types  from
  6053.           Story Parameters through the System Attributes and on through the
  6054.           various User-Defined Attributes.
  6055.  
  6056.  
  6057.           3.   User Type Label Editing
  6058.  
  6059.           User type labels for objects are text strings that you create  to
  6060.           describe  things.    They  might  be character  types:  "Cleric",
  6061.           "Warrior", "Thief", or they might be object types: "Car", "Boat",
  6062.           "Plane"  or anything  else  you can  think of.    You might  also
  6063.           categorize  scenes:  "Chase  Scene",  "Death  Scene",   "Romantic
  6064.           Interlude", etc.
  6065.  
  6066.           To create the  labels, go to  the Parameter Editing Screen,  move
  6067.           the cursor to the heading "User  Type Editor", and hit Page Down.
  6068.           Hit  "+" or Page-Down to create a new  entry.  Type in your label
  6069.           name and close by hitting the "Return" key.
  6070.  
  6071.           As you add labels, the column of  labels grows and spills over to
  6072.           a new column.   Eventually  all columns are  full and they  begin
  6073.           scrolling like a  moving belt until  finally you hit the  maximum
  6074.           system capacity.
  6075.  
  6076.           You can add  and delete labels with  "+" and "Delete" keys.   You
  6077.           can navigate the columns  with the Up-, Down-, Left-,  and Right-
  6078.           Arrow keys.  The Page-up and Page-Down keys will also navigate up
  6079.           and down the  columns, but  Page Down  adds new  labels when  you
  6080.           reach the end  of the list and  Page Up exits when  you reach the
  6081.           top.  The "Escape" key is a rapid exit from this editor.
  6082.  
  6083.           Labels can be as  many characters long as you like,  but we often
  6084.           can  only print  the  first 10-16  characters  so brevity  helps.
  6085.           Don't make duplicate labels.
  6086.  
  6087.  
  6088.                                                                          97
  6089.  
  6090.  
  6091.  
  6092.  
  6093.  
  6094.  
  6095.  
  6096.           The Story Editor                             Figment User's Guide
  6097.  
  6098.           When you delete  a label, Figment  checks for references to  that
  6099.           label in other data structures.   Object type labels are  used in
  6100.           objects and rule  expressions ("is_user_typ"  and "assign").   If
  6101.           some  data structure  uses  this label,  Figment  reports it  and
  6102.           stops.   You must  remove this  reference by  going to  that data
  6103.           structure and  deleting the reference  before you can  delete the
  6104.           label.  There are  probably more references like this  one so you
  6105.           will want to check for them before returning to delete the label.
  6106.  
  6107.           When there are no references to a label, it is easy to delete it.
  6108.           Therefore,  you  may want  to  think through  your  labels before
  6109.           committing to many references to them. 
  6110.  
  6111.           It is  much easier to rename a  label.  Just type a  new name for
  6112.           the label.   All  references to  the label  will reflect  the new
  6113.           name.   Figment really  does not know  what your  labels mean, it
  6114.           only knows that deleting them can destroy  a lot of other work so
  6115.           it checks before deleting.
  6116.  
  6117.           This process is deliberately  similar to that for the  Link Types
  6118.           and the User  Defined Attributes so once  you get the knack,  the
  6119.           others follow neatly.
  6120.  
  6121.  
  6122.           S.   Link and Attribute Type Definitions
  6123.  
  6124.           A separate editing screen is  used to specify the link types  and
  6125.           attribute types.  The method  of editing is sufficiently  similar
  6126.           that we can discuss  them together.  The process  is very similar
  6127.           to  that  for User-defined  object types.    As before,  Link and
  6128.           attribute  types  are  merely  text labels  that  you  create  to
  6129.           identify a link or attribute you want to use.
  6130.  
  6131.           From the Top Level Editor, scroll  the editing screens to display
  6132.           the  Link and  Attribute screen and  hit Page Down.   Advance the
  6133.           cursor to either  Link Editing  or Attribute Editing.   Hit  Page
  6134.           Down again.  Edit the text in the usual manner.
  6135.  
  6136.           The labels you make can be as  long as you like, but screen space
  6137.           limitations  mean  we  can often  only  display  10-16 characters
  6138.           depending  on  where  they are  used.    Abbreviations are  fully
  6139.           legitimate.  Use them as needed.
  6140.  
  6141.           Do not duplicate link  labels.  User Attributes can  duplicate if
  6142.           the duplicate  labels are in  separate categories.   For example,
  6143.           "strength"  might  be  a  physical,  psychological  or  spiritual
  6144.           attribute for a character.  If you  felt that way, then you would
  6145.           list strength separately in each category.
  6146.  
  6147.           You can delete  link types and  user attributes.  As  with object
  6148.  
  6149.           98
  6150.  
  6151.  
  6152.  
  6153.  
  6154.  
  6155.  
  6156.  
  6157.           Figment User's Guide                             The Story Editor
  6158.  
  6159.           types,  Figment reports the  first conflict  it finds  and stops.
  6160.           Delete the reference, and you can come back and delete the label.
  6161.           Link labels are used in objects and rule expressions ("is_linked"
  6162.           and  "link").    Attribute  labels  are  used  in  objects,  rule
  6163.           expressions, and profiles.
  6164.  
  6165.           You cannot delete link type "Generic".
  6166.  
  6167.           The  editing  keys work  in  the  by-now-familiar manner.    "+",
  6168.           Delete, Page-Up, Page-down keys  perform as they always do.   The
  6169.           ESC key is a rapid exit to the next highest level.
  6170.  
  6171.  
  6172.           T.   Profiles
  6173.  
  6174.           Profiles  are a weighted  decision matrix applied  to an object's
  6175.           user attributes.   They allow  you to list  attributes and  apply
  6176.           weight factors to  arrive at  scores.  The  resulting scores  can
  6177.           return TRUE/FALSE values  if they are  above or below the  cutoff
  6178.           criteria.
  6179.  
  6180.           For example, assume you want to determine if Romeo and Juliet are
  6181.           lovers.  You might write the following rule:
  6182.  
  6183.                If {
  6184.                  Romeo  does fit profile of  Juliet's Lover
  6185.                  Juliet  does fit profile of  Romeo's Lover
  6186.                  <other conditional expressions>
  6187.                } Then {
  6188.                  Link  Romeo  to Juliet  by Romance  Value 20
  6189.                  Link  Juliet  to Romeo  by Romance  Value 20
  6190.                } ...<sound of violins and waves crashing on beach>
  6191.  
  6192.  
  6193.           Certainly people have complex criteria for choosing partners, but
  6194.           rules  can't equivocate.  They need a  yes/no answer.  Does Romeo
  6195.           qualify or not?
  6196.  
  6197.           Profiles let you score candidates and bias the scores giving more
  6198.           or  less  emphasis  to attributes  you  think  are  more or  less
  6199.           important to this decision.  A  high score means Romeo makes  the
  6200.           grade.
  6201.  
  6202.           We will begin by assuming that Romeo is the strange bird referred
  6203.           to earlier in our discussion of attributes:
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.                                                                          99
  6211.  
  6212.  
  6213.  
  6214.  
  6215.  
  6216.  
  6217.  
  6218.           The Story Editor                             Figment User's Guide
  6219.  
  6220.                Type 1                   Type 2              Type 3   
  6221.           Strength       50   Courage        10   Devotion         10
  6222.           Beauty         20   Bravery         2   Purity          -40
  6223.           Warts          10   Paranoia       33   Je ne sais quoi 100
  6224.           Bad Smell      15   DrinksLikeFish 99   Chemistry        12
  6225.           Dresses Funny  10   Morals          0   Kind to Animals  23
  6226.  
  6227.  
  6228.           Ok, he's no  prize, but focusing on some of  his nobler qualities
  6229.           we  might  extract a  subset  list  and apply  weight  factors to
  6230.           signify importance like this:
  6231.  
  6232.                               Profile of Juliet's Lover
  6233.                Type 1    Wt.       Type 2    Wt.       Type 3      Wt.
  6234.           Strength       50   Courage        10   Devotion          10
  6235.           Beauty         20   Bravery         2   Je ne sais quoi   10
  6236.           Warts          10                       Chemistry        120
  6237.                                                   Kind to Animals   23
  6238.  
  6239.           In a Profile,  weights are given simply  as a value from  -128 to
  6240.           +127.  Higher values  mean they are more important.   The default
  6241.           value is  one, meaning no weighting is given.   So how does Romeo
  6242.           stack up?   Filling  in Romeo's  attribute values  on this  score
  6243.           sheet gives:
  6244.  
  6245.                Profile 1 of 2 Name: Juliet's Lover     Candidate: Romeo
  6246.  
  6247.            Type 1   Wt. V.  Sc.  Type 2  Wt. V. Sc. Type 3     Wt.  V. Sc.
  6248.           Strength  1  50   50  Courage   1 10  10  Devotion   10  10 100
  6249.           Beauty    2 -20  -40  Bravery   1  2   2  Je ne sais  1 100 100
  6250.           Warts   -10  10 -100                      Chemistry   3  12  36
  6251.                                                     Kind to An. 1  23  23
  6252.                           -----               ------                -----
  6253.                            -90                  120                   259
  6254.             Class Wgt:    x 10                 x 30                   x 5
  6255.                           -----               ------                ------
  6256.             Sub Total:    -900                  360                  1295
  6257.  
  6258.                                                                     ======
  6259.                                                         Total Score:  755
  6260.                                                             Cutoff:   500
  6261.  
  6262.           In this example,  Romeo makes the grade.   His total score  beats
  6263.           the  specified  cutoff value,  thanks  to  a  strong  showing  in
  6264.           category three which overcomes Juliet's strong dislike for warts.
  6265.  
  6266.           The Class Weight applies the weighting principle again, but  this
  6267.           time to  the categories as a  whole.  For example  a relationship
  6268.           might be platonic  or physical,  in which case  you would  stress
  6269.           those groups of attributes by increasing the class weights.
  6270.  
  6271.           100
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.  
  6278.  
  6279.           Figment User's Guide                             The Story Editor
  6280.  
  6281.  
  6282.           The candidate is an object  you intend to use with  this profile.
  6283.           You can scroll through different candidates to see how they would
  6284.           match up against your criteria.  As you change the candidates, 
  6285.           Figment displays their  values for  the specified attributes  and
  6286.           re-scores  the profile.    The candidate  is merely  a de-bugging
  6287.           tool.   It has  no effect on your  story.  You  can jump into the
  6288.           editor anytime during playback and check different candidates and
  6289.           profiles.
  6290.  
  6291.           This  example  also  illustrates  one   way  to  handle  negative
  6292.           attributes.   Juliet has  placed a  strong negative  bias on  the
  6293.           "Warts" attribute.  Fortunately she compensated in the intangible
  6294.           qualities in category III or poor  Romeo would still be searching
  6295.           the personal ads.
  6296.  
  6297.           A  profile  is, by  design, an  average  of the  many components.
  6298.           Sometimes you want to be  more discriminating.  Multiple profiles
  6299.           can help:
  6300.  
  6301.             If {
  6302.               Player  does fit profile of  President
  6303.               Player  does not fit profile of  Loose Cannon on the Deck
  6304.             }...
  6305.  
  6306.           You can put the good qualities  in the profile called "President"
  6307.           and  put the bad  qualities in the  profile "Loose  Cannon on the
  6308.           Deck".  This way  you can be sure that the bad qualities will not
  6309.           be masked by overwhelming good qualities.
  6310.  
  6311.           Profiles  can be  deleted,  but if  Figment  finds a  conflicting
  6312.           reference,  it  will report  it and  stop.   You must  remove the
  6313.           reference before  you  can  delete  the profile.    Profiles  are
  6314.           referred to in rule expressions ("does_fit").
  6315.  
  6316.  
  6317.           U.  Standard Messages and Text Variables
  6318.  
  6319.           Standard  messages can  be  used as  "text  variables" to  create
  6320.           specially-adaptable messages.
  6321.  
  6322.           Text is used in several places:
  6323.  
  6324.             object descriptions
  6325.             object examination messages
  6326.             command responses (from rules firing)
  6327.  
  6328.           Wherever text is written,  the user can include the  special text
  6329.           symbol: "@Msg: nnn",  where nnn means some  number, three decimal
  6330.           digits  or  less.    Figment  will   remove  this  symbol  during
  6331.  
  6332.                                                                         101
  6333.  
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.           The Story Editor                             Figment User's Guide
  6341.  
  6342.           processing  and insert the  message as  specified by  the number.
  6343.           (see @-Words)
  6344.  
  6345.           A separate  editing screen  is provided  where the  developer can
  6346.           write these standard  messages.  Their  only identifier is  their
  6347.           number so they  are referred to  as Standard Message 1,  Standard
  6348.           Message 2, etc. to differentiate them from rule messages.
  6349.  
  6350.           By  themselves, Standard  Messages  can simplify  development and
  6351.           maintenance.    Where a  line  of  text is  used  frequently, the
  6352.           developer can write it  once and use it repeatedly.   Maintenance
  6353.           is thereby  simplified too,  because only  one  instance must  be
  6354.           corrected.
  6355.  
  6356.           Further, you can create text composed only of  standard messages.
  6357.           You can  write rules  that copy  their messages  to the  standard
  6358.           messages.  The result is that the standard messages function like
  6359.           text  variables to  form a  larger body of  text that  changes as
  6360.           different rules fire.
  6361.  
  6362.           When  you are  using  Standard Messages  as  Text Variables,  the
  6363.           message can  look odd, because it is often  just a scrap of text.
  6364.           A standard message might read:
  6365.  
  6366.             12. and it has the old text I don't want anymore.
  6367.  
  6368.           Then the object's examination message  can include a reference to
  6369.           Message 12 among the text that it reports:
  6370.  
  6371.             "This is the object's examination message, @Msg: 12"
  6372.  
  6373.           making the examination message read:
  6374.  
  6375.             "This is the object's  examination message, and it has  the old
  6376.             text I don't want anymore."
  6377.  
  6378.  
  6379.  
  6380.  
  6381.  
  6382.  
  6383.  
  6384.  
  6385.  
  6386.  
  6387.  
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.           102
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.           Figment User's Guide                             The Story Editor
  6402.  
  6403.  
  6404.           A rule might then say:
  6405.  
  6406.             If {
  6407.              <something>
  6408.             } Then {
  6409.               copy msg to  Standard Message 12
  6410.             } Messages 1 Total  Switched: ON  Current Msg: 1
  6411.             1. and it has the new text I want to see.
  6412.  
  6413.           When the rule fires, the examination string now reads:
  6414.  
  6415.             This is the  object's examination message,  and it has the  new
  6416.             text I want to see.
  6417.  
  6418.           Of course text can be composed only of Standard Messages:
  6419.  
  6420.             "@Msg: 5  @Msg: 2  @Msg: 9"
  6421.  
  6422.             or if you want paragraph breaks in the report:
  6423.  
  6424.             "@Msg: 5
  6425.  
  6426.             @Msg: 2
  6427.  
  6428.             @Msg: 9"
  6429.  
  6430.           The result is a unique string composed of standard messages which
  6431.           can be  changed as  rules fire  and  copy their  messages to  the
  6432.           Standard Messages.  It is probably difficult to make a reasonable
  6433.           body of text  if you are trying to manipulate  a composition made
  6434.           from more than a few messages.  Complexity rises rapidly here.
  6435.  
  6436.           Standard Messages can  be used in lieu  of a unique string.   The
  6437.           advantage to the  developer is that  rules and objects can  share
  6438.           the same messages.  This can make development simpler.  Otherwise
  6439.           the message would have to be duplicated and when making revisions
  6440.           the developer must make duplicate revisions too.
  6441.  
  6442.           Standard Messages are  most useful  for examination messages  and
  6443.           command responses coming from rules that  fire.  Descriptions are
  6444.           already  complex  enough  since  they  are  composed  of  several
  6445.           individual elements gathered from the objects in the scene.
  6446.  
  6447.           1.  Editing Standard Messages
  6448.  
  6449.           Editing the messages is easy.  From  the Top Level Editor set the
  6450.           Standard Message Editor screen with the  up/down arrow keys.  Hit
  6451.           Page Down.    This adds  the first  message for  editing if  none
  6452.           already exist.   The  cursor  lands on  the first  message.   The
  6453.  
  6454.                                                                         103
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.           The Story Editor                             Figment User's Guide
  6463.  
  6464.           up/down  arrow  keys moves  the cursor  to  the next  message for
  6465.           editing.    The Page  Up/Down  keys  move through  long  lists of
  6466.           messages one screen-full  at a  time.  Escape  exits the  editor.
  6467.           The '+' key adds new messages.
  6468.  
  6469.           The text itself  is edited in the normal manner once you have put
  6470.           the  cursor on the  message you want  to change.   F6 invokes the
  6471.           full-screen editor if you want to view very long messages.
  6472.  
  6473.           Deleting  standard messages can  cause headaches.   If you delete
  6474.           Message #2,  for example, Message  #3 becomes #2.   If  your text
  6475.           refers to Message #2,  it will get  a different message than  was
  6476.           originally intended.  This reference has to be edited manually by
  6477.           changing the text.   Not fun, especially if there are 30 messages
  6478.           after #2.   Consider just blanking the message instead.   You can
  6479.           use it later if you need another standard message.
  6480.  
  6481.  
  6482.           V.  Full-Screen Text Editor
  6483.  
  6484.           The  full-screen  editor  implements a  limited  sub-set  of text
  6485.           processing commands  available on full-function  word processors.
  6486.           It is  designed so  that it can  be invoked  seamlessly from  the
  6487.           typing  buffer since  most  story messages  start small  and grow
  6488.           suddenly when inspiration strikes.
  6489.  
  6490.           To invoke the text editor, simply hit F6 at any time while typing
  6491.           text anywhere in  the Story Editor.   The screen  erases and  the
  6492.           text you began to type and the text it was replacing are put into
  6493.           the editing buffer and displayed on the editing screen.
  6494.  
  6495.           The cursor keys now behave like word processing keys:
  6496.             Left- or Right-Arrow moves the cursor one character.
  6497.  
  6498.             Up- or Down-Arrow moves the cursor one row.
  6499.             Home moves cursor to start of row.
  6500.  
  6501.             End moves cursor to end of row.
  6502.             Page-Up moves cursor to start of buffer.
  6503.  
  6504.             Page-Down moves cursor to end of buffer.
  6505.             Ctrl-Left- or Ctrl-Right-Arrow moves cursor one word.
  6506.  
  6507.             Ctrl-end  deletes text from current cursor  position to the end
  6508.             of the current row.
  6509.             Delete deletes one character in front of cursor.
  6510.  
  6511.             Backspace deletes one character behind cursor.
  6512.             Escape exits the editor.
  6513.  
  6514.  
  6515.           104
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.           Figment User's Guide                             The Story Editor
  6524.  
  6525.  
  6526.             CTRL-X exits  editor, but  discards the  changes returning  the
  6527.             original string unchanged.  Use this when you goof.
  6528.  
  6529.           Just type text as you would in  any word processor.  When you are
  6530.           through, simply  hit the  key labeled  Escape.   The screen  then
  6531.           erases and you find  yourself back in the Story  Editor with your
  6532.           cursor pointing to your new text string.
  6533.  
  6534.           The  editing  buffer is  limited to  25  lines of  80 characters.
  6535.           (When we say  it's a full-screen  editor, we mean  it - ONE  full
  6536.           screen.)
  6537.  
  6538.           See  also  the discussion  on hard  and  soft returns  in section
  6539.           I.A.2. titled "Editing Text" earlier in this document.
  6540.  
  6541.           Tabs are not implemented in the  editor since their results would
  6542.           be  unpredictable  during playback  as  messages are  combined in
  6543.           different ways.
  6544.  
  6545.  
  6546.           W.  File Management
  6547.  
  6548.           Playback quickly alters the data you  so carefully edited so good
  6549.           file  management  skills  are  important  to protect  your  work.
  6550.           Figment  can  produce  a great  many  file  types  that may  seem
  6551.           confusing at first.   This section discusses  these various files
  6552.           so you can manage them properly.
  6553.  
  6554.  
  6555.           1.  File Naming Conventions
  6556.  
  6557.           When you start a  story, default file names are  constructed from
  6558.           the  story  name  and  some  standard  file  extensions.    Other
  6559.           utilities  like  logging and  scripting  also produce  files with
  6560.           special  name extensions.  You can recognize  the type of file by
  6561.           its extension.  These extensions are:
  6562.  
  6563.             .sdf - story data file
  6564.             .sav - saved data file
  6565.             .bak - last saved file
  6566.             .lst - listing or script output
  6567.             .log - log file
  6568.  
  6569.           Of these, the files you really want to archive are the Story Data
  6570.           File and the  text form of  your log file if  you have one.   The
  6571.           rest can be periodically  purged from your disk.   The DOS  batch
  6572.           file, "purge.bat" is provided for that  purpose.  Edit this batch
  6573.           file  to  suit  your needs,  but  rename  it so  it  will  not be
  6574.           clobbered by the old purge batch file when you upgrade.
  6575.  
  6576.                                                                         105
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.           The Story Editor                             Figment User's Guide
  6585.  
  6586.  
  6587.           You should recognize the  story file by now since it  is the file
  6588.           that you read in at the  start of the session.  The save  file is
  6589.           the file you  write with the  "save" command in the  Presentation
  6590.           Environment or the  Shift-F3 key in  the editor.  Figment  cannot
  6591.           write a story data file (".sdf").  It can only write  a save file
  6592.           (".sav").   In  this way,  the story data  file is  protected and
  6593.           never over-written.  It preserves the  data in the form you  want
  6594.           it for startup.  To make a story data file, simply rename a  save
  6595.           file using the DOS command, "rename":
  6596.  
  6597.             rename demo.sav demo.sdf
  6598.  
  6599.           Another way is to copy the data:
  6600.  
  6601.             copy demo.sav demo.sdf
  6602.  
  6603.           You might do  this at the end  of an editing session  so that the
  6604.           story data file is ready for the start of the next session.
  6605.  
  6606.           The save file represents  work in progress.  It is  good practice
  6607.           to keep it separate from the story data file until you have had a
  6608.           chance to test it out and build  confidence that it is doing what
  6609.           you want.  When you are satisfied with it, you can rename it to a
  6610.           story data file.  Some  people like to copy it to a  working name
  6611.           so they can start figment with  that name, otherwise you must use
  6612.           "restore" after starting to get your working version loaded.
  6613.  
  6614.             copy demo.sav temp.sdf
  6615.             figment temp
  6616.  
  6617.           Later,  you  can rename  or  copy the  working copy  back  to the
  6618.           intended name:
  6619.  
  6620.             rename temp.sav demo.sdf
  6621.  
  6622.           The best way to get started is  to copy our demo file so you  can
  6623.           begin creating your own files for practice.
  6624.  
  6625.             copy demo.sdf <new_name>.sdf
  6626.  
  6627.           Then start Figment with that name:
  6628.  
  6629.             figment <new_name>
  6630.  
  6631.           You can start a completely new story by making up a new name that
  6632.           does not exist on your disk.  Use that name to start Figment:
  6633.  
  6634.             figment zilch
  6635.  
  6636.  
  6637.           106
  6638.  
  6639.  
  6640.  
  6641.  
  6642.  
  6643.  
  6644.  
  6645.           Figment User's Guide                             The Story Editor
  6646.  
  6647.           Figment finds no file named "zilch.sdf"  so it starts without it.
  6648.           You arrive in  Figment staring at  a very dull  story.  You  then
  6649.           enter the editor  and begin  creating your data.   When you  save
  6650.           your data, you have a new file called "zilch.sav"
  6651.  
  6652.  
  6653.           2.  Read-all, Write-all
  6654.  
  6655.           Shift-F2  and  Shift-F3  are  the  primary read-write  tools  for
  6656.           developers.  These  are similar  to "save" and  "restore" in  the
  6657.           playback  environment,  but there  is  one important  difference.
  6658.           Shift-F3 is designed  to prepare the save file for use as a story
  6659.           data file (.sdf file).  This means it will set important  data to
  6660.           the values  they should  have at  the start  of the  story.   For
  6661.           example, the move count and the score should be set to zero.  The
  6662.           scene should be set to the first scene in the map, et cetera.
  6663.  
  6664.           The process sounds good on  paper, but recognize the limitations.
  6665.           Figment  cannot  tell  what  the Player's  health  should  be for
  6666.           example or any of many attributes and associations.  Figment does
  6667.           warn you before  editing if you have  been playing your story  so
  6668.           you should have retrieved your file from disk before editing.
  6669.  
  6670.           The Shift-F3 function really expects that you will  be developing
  6671.           with a  log file  to play  the story  through a  standard set  of
  6672.           commands as you work to debug your story.  Without this log file,
  6673.           the Shift-F3  function's automatic reset will certainly aggravate
  6674.           you.   If you did not want  the automatic reset, you could hit F1
  6675.           to  return to the playback environment and then say "save".  This
  6676.           would save the data without the automatic reset.
  6677.  
  6678.           Except in rare instances,  the "save" command is  not recommended
  6679.           for developers.  Use Shift-F2 instead.
  6680.  
  6681.           The "restore" command and the Shift-F2 function are the same.
  6682.  
  6683.  
  6684.           3.  Data Backups and Version Numbering
  6685.  
  6686.           After you quit Figment, you may want to make backup copies of the
  6687.           files you made on a separate diskette.  Use the DOS COPY or XCOPY
  6688.           command to do this.
  6689.  
  6690.           At the least, you will want the ".sdf" file, but you may want any
  6691.           others you have  been making,  for example logs.   The  following
  6692.           command will  copy all  the files  for a story  from the  current
  6693.           directory to a diskette in drive B.
  6694.  
  6695.             copy <story name>.* b:\*.*
  6696.  
  6697.  
  6698.                                                                         107
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.           The Story Editor                             Figment User's Guide
  6707.  
  6708.           You can,  if you like, rename the files  at this time and thereby
  6709.           create version numbers:
  6710.  
  6711.             copy story.* b:\story2.*
  6712.  
  6713.           The advantage, of  course, is that  you can go back  and retrieve
  6714.           old versions should  you discover some disastrous  consequence of
  6715.           your editing.
  6716.  
  6717.           As mentioned previously, the listing file produced  for the rules
  6718.           is expendable.  You can see that  if you do not delete it  before
  6719.           copying  the  set,  you will  be  proliferating  obsolete listing
  6720.           files.  We recommend that  you print any listings that  you want,
  6721.           then delete "*.LST" before copying the data set.
  6722.  
  6723.           The DOS batch file, "PURGE.BAT", will  delete the data set files,
  6724.           the  backup file and the  listing file for a story.   It will not
  6725.           delete  story data  files, log files,  nor save  files.  It  is a
  6726.           useful tool for cleaning up a disk or directory that is cluttered
  6727.           with obsolete files.  To use it, simply type "purge <story_name>"
  6728.           (where <story_name> means  you type the  name of the story)  from
  6729.           the DOS command line prompt.
  6730.  
  6731.  
  6732.           4.  The Data Set Files
  6733.  
  6734.           The  Data  Set  read/write functions  (F2/F3)  have  largely been
  6735.           superseded by the  restore/save functions (Shift-F2/Shift-F3) and
  6736.           so have most of  their applications.  The Data Set  files let you
  6737.           dump portions of your story so you can read them into a different
  6738.           story.   They are not recommended  for beginners or the  faint of
  6739.           heart since there are many limitations and some pitfalls.
  6740.  
  6741.           The Data Set  files are  a low-cost feature.   Their  development
  6742.           cost is nil  since the save/restore functions  merely concatenate
  6743.           the  individual  data  set  read/write  operations with  a  small
  6744.           preamble.
  6745.  
  6746.           A good application example for the Data Set files is the Link and
  6747.           User  Attribute labels.  These  are often the  same from story to
  6748.           story so dump  them to disk  and read them  into each new  story.
  6749.           Maybe you  have a standard set  of synonyms or profiles  that can
  6750.           use the  same treatment.  Also Player Maps  can be made easily by
  6751.           dumping the  Story Map and  reading it back  into the  Player Map
  6752.           screen.  
  6753.  
  6754.           You can also move objects and rules between stories, but there is
  6755.           a serious  restriction on  moving objects;  and  rules, by  their
  6756.           nature, are  not often  portable.   Maybe the  global rules  will
  6757.           apply in a different  story, but local rules, by  definition, are
  6758.  
  6759.           108
  6760.  
  6761.  
  6762.  
  6763.  
  6764.  
  6765.  
  6766.  
  6767.           Figment User's Guide                             The Story Editor
  6768.  
  6769.           intended to be  specific to a scene.   Maybe the best  method for
  6770.           objects  and  rules  is  to print  listings  so  you  can copy  a
  6771.           technique you developed before.
  6772.            
  6773.           Each screen in  the editor has  a Data Set  file assigned to  it.
  6774.           This is the default file for dumping that screen's data type.  We
  6775.           recommend you  use  those names  since  they establish  a  naming
  6776.           convention  for  the files  produced.   You  can change  the name
  6777.           simply by moving the cursor over the name and editing the text in
  6778.           the usual manner.
  6779.  
  6780.             .stf - stuff data
  6781.             .scn - scene data
  6782.             .pre - pre-command rule data
  6783.             .pst - post-command rule data
  6784.             .smp - story map
  6785.             .syn - synonym data
  6786.             .prm - parameter data (includes status and object type labels)
  6787.             .lua - link and user attribute labels
  6788.             .prf - profiles
  6789.             .msg - standard messages
  6790.  
  6791.           You can only read or write a file from the  Top Level Editor.  F2
  6792.           and F3  do not function  in the lower  level editors.  Hit  F3 to
  6793.           write the data out to  the file named as indicated on the  top of
  6794.           the screen.   Note that the file name lights  up in reverse-video
  6795.           until  the  write completes.   If  the  file already  exists, its
  6796.           contents are completely overwritten.
  6797.  
  6798.           If the file name  indicated is not the file to which  you want to
  6799.           write, advance the  cursor with the  Right-Arrow key to the  name
  6800.           and type in a new  name.  Hit F3 again.  Note that  this does not
  6801.           change the story  name nor the name of the ".sdf" file built from
  6802.           the story  name.  (The story name is  only changed with the save,
  6803.           restore and restart commands in the story side of Figment.)
  6804.  
  6805.           A similar process applies to reading files except you hit F2.
  6806.  
  6807.           If Figment beeps  when you hit F2  or F3, it means  that it could
  6808.           not  open the  file in  question.  Maybe  you have  been juggling
  6809.           diskettes or typed  the name wrong.   Remember that you  can jump
  6810.           out of Figment  with F10, shuffle files around on  your disks and
  6811.           return to Figment to write your data.
  6812.  
  6813.           Filenames are text  strings which can  include the path to  reach
  6814.           the file which means that you can park files on other disks or in
  6815.           sub-directories on hard disks.
  6816.  
  6817.           We  have said that  you should always  write your  data out after
  6818.           making any changes, because you will  go next to the Presentation
  6819.  
  6820.                                                                         109
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.           The Story Editor                             Figment User's Guide
  6829.  
  6830.           Environment and  test  your changes  which will  alter the  data.
  6831.           Usually, this will be a save file made with the Shift-F3 key, but
  6832.           for  testing small changes sometimes you can  use a data set file
  6833.           and throw it away if you decide the test was not worth saving.
  6834.  
  6835.  
  6836.           5.  Experimental Variations
  6837.  
  6838.           The Data Set files can reduce the cost of experimentation.  
  6839.           For example, assume  you are working on  version 3 of your  story
  6840.           and you decide you do not like the way you  have changed the pre-
  6841.           command  rule base.   You do  not want  to throw version  3 away,
  6842.           because developments in other areas have merit.  You just want to
  6843.           put the old rules back.
  6844.  
  6845.           This  procedure  will  extract  the  Pre-command rule  base  from
  6846.           version 2 and load it into version 3:
  6847.  
  6848.               Caution!  Never  attempt this procedure with  object data
  6849.               files.  It works with all other data file types though.
  6850.  
  6851.             1.  Save version 3 with Shift-F3
  6852.             2.  Return to playback mode. Restart or restore version 2.
  6853.             3.  Enter  editor, display  pre-command screen,  dump the  pre-
  6854.                 command rule bases with F3.
  6855.             4.  Return to playback mode, restore version 3.
  6856.             5.  Enter  editor,  display  pre-command  screen,  change  read
  6857.                 filename to "version2.pre", hit F2.
  6858.  
  6859.           This example works whenever the object  set (meaning in this case
  6860.           the  names  of the  stuff  and  scenes) was  not  changed between
  6861.           revisions.  If  the object  names changed between  version 2  and
  6862.           version  3, the  rules  will show  "Not Found"  when a  change is
  6863.           encountered, meaning the  object name used  in the data file  was
  6864.           not found in the current object list.
  6865.  
  6866.           Notice that you  can carve up version  2 all you want  before you
  6867.           write the rule base out to its data set file(s).  As long as  you
  6868.           do not save  your changes with  "save" or Shift-F2,  there is  no
  6869.           harm done.  This means you can fix the object names in  version 2
  6870.           before  you write out the rule base.   Then, you will not get the
  6871.           "Not Found" references when the rule base reads into version 3.
  6872.  
  6873.           What happens if version 3 has deleted a map block?  The rule base
  6874.           from version  2  will not  match  the rule  base  for version  3.
  6875.           Again, the solution is to delete the same map block in  version 2
  6876.           before writing the rule base out to its  data set file.  Then, it
  6877.           will be in the right order when it reads into version 3.
  6878.  
  6879.  
  6880.  
  6881.           110
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.           Figment User's Guide                             The Story Editor
  6890.  
  6891.           6.  Object References in Data Set Files
  6892.  
  6893.           As  mentioned  previously, Objects  are  the building  blocks for
  6894.           stories.   Many other data  structures refer  to them, and  it is
  6895.           these references that  cause problems  when moving  data via  the
  6896.           Data Set files.  Whenever a data structure cannot find the object
  6897.           being referred to during read-in, it substitutes a reference to a
  6898.           dummy object called "(Not Found)".
  6899.  
  6900.           Actually "(Not Found)"  is a stuff object  in its own right.   It
  6901.           merely lacks the links, text and attributes your original  object
  6902.           had.  As you play your story with this object, you notice missing
  6903.           descriptions and rules that do  not fire when they should.   Jump
  6904.           into the editor and  you find a rule  referring to something  not
  6905.           found.  In fact,  this is probably the first thing to look for if
  6906.           you have been juggling data with F2/F3.
  6907.  
  6908.           The "(Not Found)"  reference will remain  until you edit it  out.
  6909.           It does not  disappear on  file write/read operations.   You  can
  6910.           ignore them and play your story and correct them as you find them
  6911.           if you do not want to go on a witch hunt.
  6912.  
  6913.           Usually, you do not make wholesale revisions to your object names
  6914.           so one  or two quick edits  puts you back  in shape.  If  you are
  6915.           looking at a screen where you can clearly read "(Not Found)" just
  6916.           add the object  you need  and edit  the reference to  read as  it
  6917.           should.  Problem solved.  If this is a rule, the problem probably
  6918.           occurs in several rules so check other rules as required.
  6919.  
  6920.           Note that a similar problem occurs  when reading Scene data files
  6921.           since their  link lists refer to  Stuff objects.  Also  with maps
  6922.           since  they  refer to  Scenes.   Rules  refer to  both  stuff and
  6923.           scenes.
  6924.  
  6925.  
  6926.           X.  Deleting Objects
  6927.  
  6928.           As  mentioned  earlier,  deleting objects  is  easy:  advance the
  6929.           cursor  over  the object  name  and hit  the  "Delete" key.   The
  6930.           problem is the object  references, and it is similar  to handling
  6931.           the "(Not Found)" problem.
  6932.  
  6933.           Figment inserts a  reference to a dummy object  named "(Deleted)"
  6934.           wherever there  is a reference  to an  object you  are trying  to
  6935.           delete.    When all  references  have  been replaced,  it  safely
  6936.           deletes the object.  Figment cannot resolve what to do with these
  6937.           references so it  does not try.   It simply leaves this  dummy in
  6938.           place for you  to correct at your leisure.  There are many places
  6939.           this object might be referenced:
  6940.  
  6941.  
  6942.                                                                         111
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.           The Story Editor                             Figment User's Guide
  6951.  
  6952.             Link lists in other objects
  6953.             Rules
  6954.             Story and Player Maps
  6955.  
  6956.           Deleting one object can  make many references to  the "(Deleted)"
  6957.           object.   Deleting  several  objects at  once  simply makes  more
  6958.           references and  it can  make it hard  for you  to figure  out the
  6959.           right correction.  Maybe you want to delete one object at a time.
  6960.  
  6961.           Note when deleting scenes  that this does not remove  rule bases.
  6962.           The  map  block that  referred  to  this scene  is  simply titled
  6963.           "(Deleted)".   Only when  you delete this  map block  in the  map
  6964.           editor will the  rule base for that  map block be lost.   You may
  6965.           play your story with  the map still referring to  deleted scenes.
  6966.           When you  arrive in a  deleted scene,  Figment politely  reports,
  6967.           "This scene has  been deleted."  This  should be your cue  to fix
  6968.           your map.
  6969.  
  6970.           You can leave these references to "(Deleted)" in place, play your
  6971.           story and fix  them when found.  The sky has not fallen and panic
  6972.           is not required.  You can  even write and read the story  to/from
  6973.           disk.  The reference to "(Deleted)" stays with you  until you are
  6974.           ready to fix the  reference.  It  is simply a civilized  reminder
  6975.           that you  have some editing  to do.   As with all edits  you will
  6976.           want to write the repaired data to disk when done.  
  6977.  
  6978.           Recognize that if you are  deleting an object just to replace  it
  6979.           with a different object, then you should not delete the object at
  6980.           all.  You should rename it.
  6981.  
  6982.  
  6983.           Y.  Debugging Tips
  6984.  
  6985.           By now,  it should be clear that the  data in the editor reflects
  6986.           the current state of the story when you entered the editor.  This
  6987.           means that the editor functions well as a debugger because it can
  6988.           display any data at will.  Coupled with a log file and its pause,
  6989.           interrupt  and  single-stepping  features,  this  is  a  powerful
  6990.           debugging technique.
  6991.  
  6992.           This section gives you advice for what  to look for in the editor
  6993.           when  you  have  a  problem  with your  story.    Once  you  have
  6994.           identified the problem, read  in the data from disk to  reset the
  6995.           data to the  starting condition, fix  the problem, then file  the
  6996.           data back out and go back to the Presentation Environment to  try
  6997.           your fix.
  6998.  
  6999.           If  you  are not  getting  the  messages in  the  description you
  7000.           expected, check the  scene object and  the objects in the  scene.
  7001.           If  the  messages  are  there,  but  not  displaying,  check  the
  7002.  
  7003.           112
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.           Figment User's Guide                             The Story Editor
  7012.  
  7013.           attributes.  If  the attributes  are wrong, the  object might  be
  7014.           ignored.  If the attributes  are right, look at the  scene object
  7015.           to see if the offending object  is linked in to the scene.   Most
  7016.           likely this problem  occurs with new  objects when you forget  to
  7017.           set the attributes or link it into the scene.
  7018.  
  7019.           If  you are not getting  messages you expect  from rules, you can
  7020.           have several problems:
  7021.  
  7022.             Check to see if the message has switched off.
  7023.  
  7024.             Check the  rule type.  Is it an "If" rule that has switched off
  7025.             when it should have been a "While" rule that would stay on?   
  7026.  
  7027.             Do the conditions hold true?
  7028.  
  7029.             If the rule  conditions require links between objects, do those
  7030.             links exist?
  7031.  
  7032.             Is the message  pointer displaying the wrong  message currently
  7033.             in the editor?
  7034.  
  7035.             Did you leave the message print switch set wrong?
  7036.  
  7037.             Did you omit an "inc_msg" step in the executionals?
  7038.  
  7039.             Check  Pre-command  rules  to see  if  you  forgot  to set  the
  7040.             enable/disable switch.
  7041.  
  7042.             Check the order  of rules.  Does  a rule that  should establish
  7043.             the conditions for this rule come  after this rule?  Change the
  7044.             order.
  7045.  
  7046.             If you have been deleting objects  or juggling data files, look
  7047.             for a reference to "Deleted" or "Not Found".
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.                                                                         113
  7065.  
  7066.  
  7067.  
  7068.  
  7069.  
  7070.  
  7071.  
  7072.           Story Design                                 Figment User's Guide
  7073.  
  7074.           Part III. Story Design
  7075.  
  7076.           So far we have discussed what  Figment is, how it works, and  its
  7077.           commands  and procedures.   This  section discusses  some of  the
  7078.           finer points of  story design  that are  not immediately  obvious
  7079.           from the mechanical descriptions so far.
  7080.  
  7081.  
  7082.           A.  Skill Level
  7083.  
  7084.           You need not worry  about the skill level in the  early stages of
  7085.           your story design.  This is an embellishment that comes later  in
  7086.           the  evolution of  your story.   Once your story  has developed a
  7087.           structure  and you can point to key  milestones in the play, then
  7088.           you  can  award  points  with   "change_score"  when  the  player
  7089.           completes certain tasks.
  7090.  
  7091.           Skill can be considered a measure of the player's efficiency.  If
  7092.           the  player achieves point  awards (that  you the  story designer
  7093.           give the  player) greater than or  equal to the number  of moves,
  7094.           then the highest skill level is achieved.  There are five levels:
  7095.           Novice, Average, Pro, Expert, and Wizard.
  7096.  
  7097.           It  seems nicer  to award points  steadily through the  play in a
  7098.           scene rather than all at  once at the end.  This tends  to signal
  7099.           to the player  that he  or she  is making progress  in the  right
  7100.           direction.   Several  small milestones  are better  than one  big
  7101.           milestone.  You want to encourage your players, not send  them on
  7102.           a forced march through a desert of no reward.
  7103.  
  7104.           A player's  health grows slowly over  time to a level  limited by
  7105.           the  player's  skill.   Since health  points  are the  "fuel" for
  7106.           battle,  player's with  greater  skill can  start from  a greater
  7107.           advantage.  This is a minor point, however.
  7108.  
  7109.           Similarly, the  maximum food-count that  a player can  achieve is
  7110.           also  a function  of skill.   Thus  excessive food  is wasted  on
  7111.           novices, while wizards get  more mileage from their food.   Maybe
  7112.           they are in  better training.   This too can  be circumvented  by
  7113.           setting high initial food values and slow decrement (metabolism?)
  7114.           rates in the parameter editor.
  7115.  
  7116.           A good rule of  thumb might be to award a number  of score points
  7117.           with "change_score" equal to the minimum number of moves required
  7118.           to complete  a scene.   (Actually, you will  have to award  a few
  7119.           extra   points   for  round-off.)      This  strategy   makes  it
  7120.           theoretically possible to  attain Wizard status although  it will
  7121.           be practically impossible.
  7122.  
  7123.           The move count through a scene is  also affected by the number of
  7124.  
  7125.           114
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.           Figment User's Guide                                 Story Design
  7134.  
  7135.           conflicts  that  take place  within  a  scene.   Since  these are
  7136.           variable, you will not be able to predict the move count exactly.
  7137.           You may have  to average the move  count over five or  ten scenes
  7138.           and adjust your point awards accordingly.
  7139.  
  7140.           If you award more than the minimum number of points  required for
  7141.           wizard  status, the  excess represents  a  bonus reserve  for the
  7142.           player.  Nice from a player standpoint.
  7143.  
  7144.           See  also  the  discussion  on strategic  weapons  later  in this
  7145.           section since they  are the only  thing that absolutely  requires
  7146.           skill.
  7147.  
  7148.  
  7149.           B.  Examine Strings
  7150.  
  7151.           Examination  strings  are a  useful  way for  providing necessary
  7152.           clues so that play  can proceed.  Stories that  are forever stuck
  7153.           in the  first scene are not fun.   If your friends are completely
  7154.           stumped by your story, you can  break the logjam with some clever
  7155.           clues.
  7156.  
  7157.           The "on_skill" function was specifically intended so you can pass
  7158.           clues at an appropriate level of difficulty based on the player's
  7159.           skill.  You  might choose  to reveal more  information to  highly
  7160.           skilled players  as a reward for  earning their high status.   On
  7161.           the other hand, you might  take pity on beginners.  In  practice,
  7162.           you might do some of both at different times in the story.
  7163.  
  7164.           Examine  strings  are  also used  to  write  victory  messages in
  7165.           conflicts.    See  also  "Conflict  Conclusions"  later  in  this
  7166.           section.
  7167.  
  7168.  
  7169.           C.  Health Points
  7170.  
  7171.           As mentioned your health  suffers in conflicts.  It  also suffers
  7172.           from hunger.  When the  player's health is low, Figment begins  a
  7173.           recuperation  process  by  gradually  incrementing  the  player's
  7174.           health until it  reaches limits according to  the player's skill.
  7175.           Depending on how  you have composed your  scene, you may  have to
  7176.           speed this process up.  
  7177.  
  7178.           You can manipulate  this directly  with executional functions  in
  7179.           rules by concocting some literary device ("You discover a healing
  7180.           potion") and award  extra health points with  the "change_health"
  7181.           function.  This can also back-fire ("Sorry, this must have been a
  7182.           bad batch.").
  7183.  
  7184.           Potions and food, when  consumed, add their health  attributes as
  7185.  
  7186.                                                                         115
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.           Story Design                                 Figment User's Guide
  7195.  
  7196.           well.    You can  sprinkle them  throughout  your story,  but you
  7197.           cannot  dictate  when  the  player  will actually  consume  them.
  7198.           Players can be understandably  gun-shy about them since they  can
  7199.           also  backfire  on  them  with  negative  attributes.    See  the
  7200.           discussions on potions and food later in this section.
  7201.  
  7202.           You  can also control the  rate of recuperation  for the story in
  7203.           the  parameter  editor.    Fast-paced  stories  with  many  fight
  7204.           sequences   may  require   faster   recovery.     Increasing  the
  7205.           recuperation rate increases the probability  that the player will
  7206.           escape  defeat  in  conflicts.    See  also  the  escape   clause
  7207.           description under "Conflicts" in this section.
  7208.  
  7209.  
  7210.           D.  Strength
  7211.  
  7212.           A player's strength can grow steadily to the maximum (+127) value
  7213.           after sufficient conflicts if you do  not create some pitfalls to
  7214.           reduce it.   For a while, you  can compensate for this  with more
  7215.           potent  bad  guys, but  eventually,  you  may have  to  prune the
  7216.           player's  strength level.    Poor health  of  course reduces  the
  7217.           player's strength automatically.
  7218.  
  7219.           Similar  thoughts  apply  to  magic.    There  are  no  automatic
  7220.           reductions for magic so you must apply your own.
  7221.  
  7222.  
  7223.           E.  Conflicts
  7224.  
  7225.           In order  to start  a conflict (Hex  or Fight) the  opponent must
  7226.           have some health  points, otherwise  you immediately defeat  your
  7227.           opponent.  If this happens, it  probably means the story designer
  7228.           did not intend  for you to engage this character in conflict.  As
  7229.           a  story  designer,  perhaps  you  do  not want  to  signal  your
  7230.           intentions so  clearly.  You may want to give all your characters
  7231.           some health points so they can put up some kind of fight.
  7232.  
  7233.           Note  that  you are  not  required  to give  your  characters any
  7234.           strength or magic points.  The player can engage these characters
  7235.           and quickly dispatch them.   They must have neither  strength nor
  7236.           magic for this to  occur (Otherwise, the character  might deflect
  7237.           you.  Read on.).
  7238.  
  7239.           You  do  not grow  by  defeating  wimpy  characters  without  the
  7240.           necessary qualifications (magic or strength), but you get a point
  7241.           award as though this were a good thing to do.  In fact, you might
  7242.           be eliminating  someone who  could help  you solve  a puzzle,  in
  7243.           which case you won a small consolation, but lost in the end.
  7244.  
  7245.           An opponent who has only magic, but no strength will  deflect you
  7246.  
  7247.           116
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.           Figment User's Guide                                 Story Design
  7256.  
  7257.           if you attempt to fight the character.  Similarly, you will  also
  7258.           be  deflected if  you attempt  to hex  a  character who  has only
  7259.           strength and  no magic.   In this way,  you are coerced  into the
  7260.           correct form of conflict.  Characters  can have both strength and
  7261.           magic, in which  case you can either  fight or hex them,  but not
  7262.           both  since  they  (or sadly,  you)  will  be  eliminated by  one
  7263.           conflict or the other.
  7264.  
  7265.           Although you are locked into a fight to its conclusion, the story
  7266.           still proceeds  as you  fight.  That  is to  say that  each wager
  7267.           counts  as  a  move  and  the  post-command rule  base  is  still
  7268.           processed with  each move.   This  means that  other actions  can
  7269.           still transpire while you are engaged  in battle.  Consider using
  7270.           "hit" and "charm" when characters gang up  on you.  At least then
  7271.           you might be able to retreat.
  7272.  
  7273.           Perhaps we should not tell you, but  there is one loophole out of
  7274.           conflicts.   The fight ends  when you lose  all your health,  but
  7275.           Figment doles out health points when you are ill.  If the killing
  7276.           blow drops you  to zero only, and  if it happens to be  that move
  7277.           when Figment gives  you a health point,  then you are out  of the
  7278.           fight but miraculously saved.  We recommend you flee.  (Yes, this
  7279.           was a bug, but we liked it so much we made it a feature.)
  7280.  
  7281.  
  7282.           1.  Conflict Conclusions
  7283.  
  7284.           You  may  have  noticed  there  are  no  gruesome  remains  after
  7285.           dispatching your opponents in  battle.  (This is a  family show.)
  7286.           Figment's little minions quickly spirit  away the remains leaving
  7287.           any objects the character possessed behind as booty.
  7288.  
  7289.           This can  be used as  another way to  introduce new  objects into
  7290.           play since  objects that  characters have  are not  known to  the
  7291.           player unless you happen to write messages mentioning them.  Note
  7292.           that  there is nothing to stop a  player from taking these things
  7293.           directly from the character unless you write pre-command rules to
  7294.           prevent them.  Of course  it is extremely difficult to take  what
  7295.           you do  not know is there, but  this knowledge quickly comes with
  7296.           repeat plays.  (Skill from experience again.)
  7297.  
  7298.           When  the  conflict  is  over,  Figment reports  the  examination
  7299.           message  for the victor.   Thus if  you want a  catchy message to
  7300.           appear  at the end of the  conflict, you write a Pre-Command rule
  7301.           that loads  the examination  messages for  the character  and the
  7302.           player.  Since any existing examination messages are probably not
  7303.           appropriate  for the moment of victory, you  will have to write a
  7304.           rule just to blank them so you may as well write some appropriate
  7305.           message.
  7306.  
  7307.  
  7308.                                                                         117
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314.  
  7315.  
  7316.           Story Design                                 Figment User's Guide
  7317.  
  7318.           You can also use this rule to award points in advance in addition
  7319.           to  the one that the player will  get for winning.  If the player
  7320.           loses  the battle, the score is irrelevant  anyway so there is no
  7321.           harm in awarding extra points in advance.
  7322.  
  7323.  
  7324.           2.  Negative Attributes in Conflicts
  7325.  
  7326.           The editor prohibits  negative attributes for all  objects except
  7327.           those  of  type  "Thing",  but  the  Player's attributes  can  go
  7328.           negative  as  a result  of  consuming  food and  potions.   Since
  7329.           conflicts take the sum of the  appropriate attributes in order to
  7330.           weight the  outcome, a negative  attribute can serve  to handicap
  7331.           the Player.   There are  two possibilities.   Consider them  when
  7332.           debugging conflicts.
  7333.  
  7334.           One possibility is  that the  player's attributes themselves  are
  7335.           less than one.   In which case, Figment will not allow the player
  7336.           to enter the conflict in the first place.
  7337.  
  7338.           The second possibility is that the player may be carrying objects
  7339.           with negative  attributes.   Figment sums  the attributes  of the
  7340.           player's  possessions  to arrive  at  a value  for  weighting the
  7341.           results of the random number generator.
  7342.  
  7343.           Figment  grants  one  small  boon   when  dealing  with  negative
  7344.           attributes.  If  the sum of  the attributes is negative,  Figment
  7345.           adds the minimum to the Player's  attribute to allow the conflict
  7346.           to proceed.   In  the extremely  unlikely event  that the  player
  7347.           might win,  the added  attributes remain as  a bonus even  if the
  7348.           offending objects are later dropped.
  7349.  
  7350.           Whether  or not the player succeeds  as a result of this, depends
  7351.           entirely on the opposing character.  If the opposing character is
  7352.           weak, then  the player  stands a  fair chance of  winning.   This
  7353.           gives rise to  an interesting situation: present  two characters,
  7354.           one weak,  one strong.  If  the player fights the  weak character
  7355.           first, then drops  the handicap, it  is possible that the  player
  7356.           will then have sufficient strength or  magic to defeat the strong
  7357.           character, but the player must choose which to fight first.
  7358.  
  7359.  
  7360.           F.  Links
  7361.  
  7362.           Links were originally very  simple: A was  linked to B, that  was
  7363.           it.    Now  links  include  types  and values  which  makes  them
  7364.           significantly more complex to develop and track during play.  Our
  7365.           advice to  beginners is to ignore  the link type and  value until
  7366.           your  work grows to  a point that  needs to  distinguish the link
  7367.           type.  A  plain, vanilla, generic link  is all you need  for most
  7368.  
  7369.           118
  7370.  
  7371.  
  7372.  
  7373.  
  7374.  
  7375.  
  7376.  
  7377.           Figment User's Guide                                 Story Design
  7378.  
  7379.           tasks.
  7380.  
  7381.           You can have links to as many as 32  objects, unless you have set
  7382.           the  limit  attribute to  less.   Restricting  links in  this way
  7383.           causes certain effects.  For example, you may  not want people to
  7384.           load a container too full.  Characters with low link  limits will
  7385.           refuse things that are given to them.
  7386.  
  7387.           Figment will not let you exceed the link limit set for an object.
  7388.           The most likely  objects to exceed  their limits are the  player,
  7389.           any  scene, and  any  container.    The commands  "put",  "take",
  7390.           "drop",  and  "give"  are designed  to  insulate  objects against
  7391.           exceeding their limits, but  there is no guarantee you  will like
  7392.           the  way it is  done.  For  example, when you  drop an object and
  7393.           exceed  the  scene's limit,  you get  the  message "You  drop the
  7394.           <object>...and  it disappears!".   This is really  a statement of
  7395.           last resort, because  players tend  to function like  hyperactive
  7396.           pack rats grabbing everything that  isn't nailed down and dumping
  7397.           them in  some convenient  scene.   Therefore setting  a low  link
  7398.           limit on a scene makes it  a very inhospitable place for orphaned
  7399.           objects.
  7400.  
  7401.           The executional function, "link",  cannot be so subtle.   If this
  7402.           function encounters a limit during play,  it prints a nasty error
  7403.           message to the  command line.   This message  is really aimed  at
  7404.           you, the developer, not the end user.   If you have designed your
  7405.           story and tested it well, you should not  see this message during
  7406.           normal play.
  7407.  
  7408.           Avoid duplicate links.  They are  fairly harmless, but you should
  7409.           avoid them  anyway.  The second  link would be ignored  until the
  7410.           first one was  removed.  The  executional function, "link",  will
  7411.           not make  a duplicate link;  it just changes  the value  when the
  7412.           intended link duplicates an existing link.
  7413.  
  7414.           There is nothing to say that an object cannot be linked into many
  7415.           different scenes.   Often, this  might be a  standard feature  so
  7416.           there will not be any  confusion if the player should attempt  to
  7417.           take the object, but it does not have to be a feature.
  7418.  
  7419.           Containers greatly expand your capacity.  An object can be linked
  7420.           to 32 objects which in turn can be linked  to 32 objects which in
  7421.           turn....well, there is almost no limit.  Thus if the player has a
  7422.           container, the container  can have its  own container, etc.   The
  7423.           player has to load these in sequence:
  7424.  
  7425.             >take ball
  7426.             >put ball in box
  7427.               <repeat up to 31 more objects>
  7428.             >take box
  7429.  
  7430.                                                                         119
  7431.  
  7432.  
  7433.  
  7434.  
  7435.  
  7436.  
  7437.  
  7438.           Story Design                                 Figment User's Guide
  7439.  
  7440.             >put box in bag
  7441.               <repeat up to 31 more objects>
  7442.             >take bag
  7443.  
  7444.           but at least it is possible to nest  objects several levels down.
  7445.           These nested objects would  have to be unloaded in  reverse order
  7446.           with the take-from command:
  7447.  
  7448.             >take box from bag
  7449.             >take ball from box
  7450.  
  7451.           See also  the additional discussion  on containers later  in this
  7452.           section.
  7453.  
  7454.  
  7455.           G.  Controlling the Random Number Generator
  7456.  
  7457.           Figment's  random  number  generator  gives  you the  ability  to
  7458.           control it so  that you can predict its behavior for debugging or
  7459.           training purposes.
  7460.  
  7461.           Computer  random number  generators require  an initial  starting
  7462.           number  called a seed.   Once this  seed number is  supplied, the
  7463.           routine  can  return an  endless  list  of random  numbers.   The
  7464.           sequence is random, but  the seed is not, hence the term "Pseudo-
  7465.           random".   Indeed,  for  the same  seed, you  will  get the  same
  7466.           sequence.
  7467.  
  7468.           Figment  supplies a new seed  number each time  you start so that
  7469.           the sequences will  always be different.   This is probably  what
  7470.           you want during  playback, but it is certainly not  what you want
  7471.           when  you  are debugging  stories,  for example  with  log files.
  7472.           Therefore, Figment allows you to specify the seed when you start.
  7473.           Thus the command from DOS:
  7474.  
  7475.             figment <story_name> <seed_number>
  7476.  
  7477.           will start Figment with the specified seed number.  The number is
  7478.           any integer between  0 and 32767.   The number you choose  is not
  7479.           important.  So  long as you use  the same number every  time, you
  7480.           will  get  consistent  results  when  your  log  files  encounter
  7481.           conflicts.
  7482.  
  7483.           This procedure is also useful for beginners and young players who
  7484.           want to simplify the conflicts.
  7485.  
  7486.  
  7487.  
  7488.  
  7489.  
  7490.  
  7491.           120
  7492.  
  7493.  
  7494.  
  7495.  
  7496.  
  7497.  
  7498.  
  7499.           Figment User's Guide                                 Story Design
  7500.  
  7501.           H.  Potions and the Drink Function 
  7502.  
  7503.           The drink function tests to see  if the object sub-type attribute
  7504.           is set to "Potion".  If not, the command fails.
  7505.  
  7506.           When  the player drinks a potion,  the potion's strength, health,
  7507.           and magic attributes are added to those of the player.  This is a
  7508.           good place to  use negative attributes.  Potions can be a mixture
  7509.           of some  good qualities and some  bad qualities.  For  example, a
  7510.           potion that increases strength might reduce health.
  7511.  
  7512.           If the player  does not have the potion, but the scene does, then
  7513.           Figment performs an automatic "take"  command.  This take command
  7514.           is a fully legal take operation: any rules you have waiting for a
  7515.           take operation will  fire, and  anything that causes  it to  fail
  7516.           will  cause  the  drink  command to  fail.    The  move  count is
  7517.           incremented twice if  taking is required.  The post-command rules
  7518.           are also processed.
  7519.  
  7520.           A potion  must be opened in order to be  drunk.  If the potion is
  7521.           not open, Figment will not open it automatically.
  7522.  
  7523.           The potion's limit attribute indicates how  many times the potion
  7524.           can be drunk.
  7525.  
  7526.  
  7527.           I.  Weighty Matters 
  7528.  
  7529.           The  weight  attribute  is  another  way  to  limit  the player's
  7530.           possessions besides the limit  attribute.  It indicates how  much
  7531.           the player  can carry on the  basis of weight, whereas  the limit
  7532.           attribute indicates the quantity  on the basis of count.   If the
  7533.           player wants  to take an  object, that object's  weight attribute
  7534.           cannot exceed the player's weight attribute  (less the sum of the
  7535.           weights for any objects that the player is already carrying).
  7536.  
  7537.           You are  not required to  specify an  object's weight; it  can be
  7538.           weightless.  This means you can ignore weight  early in the story
  7539.           design and add it later to add another dimension to the story.
  7540.  
  7541.           Weight really only applies to objects  of type "Thing" and varies
  7542.           from -127 to 127.  Objects  with negative weights are, in effect,
  7543.           lighter than air.  Their negative value reduces the sum and allow
  7544.           the player to carry more weight:
  7545.  
  7546.             >take the helium balloon
  7547.             You feel lighter.
  7548.  
  7549.  
  7550.  
  7551.  
  7552.                                                                         121
  7553.  
  7554.  
  7555.  
  7556.  
  7557.  
  7558.  
  7559.  
  7560.           Story Design                                 Figment User's Guide
  7561.  
  7562.           J.  Size and Containers 
  7563.  
  7564.           The  size attribute is used with containers  in much the same way
  7565.           that the weight attribute limits the  player object.  The size of
  7566.           an  object  to  be  added  to   a  container  cannot  exceed  the
  7567.           container's size as indicated by its size attribute (less the sum
  7568.           of the sizes of any objects already in the container).
  7569.  
  7570.           As with weight, you are not obliged to specify an objects's size.
  7571.           The player never  is concerned  with an object's  size, only  its
  7572.           weight.
  7573.  
  7574.           Containers can  be somewhat  magical in  the sense  that you  can
  7575.           place many objects in the container and then specify an arbitrary
  7576.           weight  for  the  container  (even  zero  weight  if   you  like)
  7577.           completely  independent  of  the object  weights.    In addition,
  7578.           containers count as only  one object so they greatly  enlarge the
  7579.           player's carrying capacity.
  7580.  
  7581.           Size really only  applies to objects  of type "Thing" and  varies
  7582.           from -127 to  127.  Objects with  negative size, when added  to a
  7583.           container, have the ability to fit  more objects in the container
  7584.           than would be possible without them.
  7585.  
  7586.  
  7587.           K.  Waving the Flags 
  7588.  
  7589.           One little lock  flag per object  does not sound  like much,  but
  7590.           when you consider  that you  can have 32  objects (including  the
  7591.           player) in a  scene plus the scene's  lock flag, you  are dealing
  7592.           with 33 flags  per scene.  This  is more than enough  to keep the
  7593.           player busy.   In addition the open  flag can often be  used in a
  7594.           similar manner which can add another 33 flags.
  7595.  
  7596.           It is technically feasible to re-use an object's lock flag within
  7597.           the  same  local rule  base since  rules  can expire  before they
  7598.           conflict.  People who design  for this, though, deserve  whatever
  7599.           consequences they get.
  7600.  
  7601.           Technically speaking, any object can  be locked, but when applied
  7602.           to story situations, it would not  make much sense if the  player
  7603.           went  around  locking  and  unlocking   or  opening  and  closing
  7604.           everything in sight.   (Which he or she could do, by  the way, if
  7605.           the permission  flags are  not set.   The  default permission  is
  7606.           therefore "NO"  which requires you  to specify which  objects the
  7607.           player can lock or open.)
  7608.  
  7609.           Since most objects will have access  to their flags denied to the
  7610.           player, their flags are available for use in your rules.
  7611.  
  7612.  
  7613.           122
  7614.  
  7615.  
  7616.  
  7617.  
  7618.  
  7619.  
  7620.  
  7621.           Figment User's Guide                                 Story Design
  7622.  
  7623.           We  use  the  Lock flag  often  in  our rules.    When  the right
  7624.           conditions are  met, we change the  flag.  Many  other events are
  7625.           testing this flag, and when it changes, it triggers these events.
  7626.           You will see  many rules in the Pre- and  Post-command Rule Bases
  7627.           testing this flag.
  7628.  
  7629.           The executional functions,  "Open" and "Close" are  more powerful
  7630.           than the forms  of these commands that the player uses.  Notably,
  7631.           the Open executional function does not test the Lock flag.  Hence
  7632.           objects can be opened or closed regardless of the status of their
  7633.           Lock flag.  This makes the Open flag a free switch for you to use
  7634.           just like the Lock  flag, for example for characters  to indicate
  7635.           they will take an object if you give it.
  7636.  
  7637.  
  7638.           L.  Reading Scrolls 
  7639.  
  7640.           Scrolls just  produce nice  gibberish when  they are  read.   You
  7641.           disable this by  writing a  pre-command rule that  tests for  the
  7642.           read function and disables it so  you can substitute your message
  7643.           when the appropriate conditions are met.
  7644.  
  7645.           Since scrolls are defined by a sub-type attribute, objects can be
  7646.           things,  features,  and  even  characters  and still  qualify  as
  7647.           scrolls.   This means  the player can  read signs,  inscriptions,
  7648.           monuments, documents etc.
  7649.  
  7650.  
  7651.           M.  Strategic Weapons 
  7652.  
  7653.           A strategic weapon  is any weapon  that functions at a  distance.
  7654.           More specifically, it  is an object  whose sub-type attribute  is
  7655.           set to read "Strategic".  Their advantage should be obvious since
  7656.           they allow you to  dispatch an opponent without risking  a fight.
  7657.           This luxury does not come free however.  You might be risking all
  7658.           since your shot is  governed by a random process which could come
  7659.           up heavily against you.
  7660.  
  7661.           Strategic weapons come  in two parts:  the weapon itself and  its
  7662.           ammunition.   You must have  both objects in  order to shoot  the
  7663.           weapon.   Create both  objects in the  Stuff Editor and  link the
  7664.           weapon to its ammunition.  The limit attribute for the ammunition
  7665.           object determines how many times the weapon can be fired.   It is
  7666.           decremented each time the weapon is fired.
  7667.  
  7668.           Actually, the ammunition is contrived to be an ammunition holder,
  7669.           for example:
  7670.  
  7671.  
  7672.  
  7673.  
  7674.                                                                         123
  7675.  
  7676.  
  7677.  
  7678.  
  7679.  
  7680.  
  7681.  
  7682.           Story Design                                 Figment User's Guide
  7683.  
  7684.               Weapon  Ammunition Holder
  7685.               gun clip, magazine, or chamber
  7686.               bow quiver
  7687.               phaser  battery pack or power cell
  7688.  
  7689.           When the ammunition runs out,  Figment reports, "Your <ammunition
  7690.           holder> is  empty."    The  type  attribute  for  strategics  and
  7691.           ammunition  should be "Thing".   The sub-type attribute should be
  7692.           "Strategic" for the weapon and "Goody" for the ammunition holder.
  7693.  
  7694.           The player's  skill largely  determines the  outcome which  means
  7695.           that the lowest two skill levels should not use strategics.   The
  7696.           best a  Novice can  do  is avoid  a  self-inflicted injury.    An
  7697.           Amateur can do better  but cannot succeed in killing  an opponent
  7698.           so there is little  reason to try.  The next three classes have a
  7699.           low, medium and high chance of success respectively.
  7700.  
  7701.           Strategics are  a high risk  weapon.  Any  skill level can  still
  7702.           score  so lowly with a strategic weapon that  he or she dies of a
  7703.           self-inflicted wound.  When the player scores high, however,  the
  7704.           opponent is quickly dispatched.
  7705.  
  7706.           It must be  said that some Wizards are  better than other Wizards
  7707.           since  it is  an unlimited  class, you  just  get more  (or less)
  7708.           Wizardly.   Therefore,  when it  comes  to strategics,  there can
  7709.           still be some surprisingly inept Wizards  out there (You know who
  7710.           you are).
  7711.  
  7712.           Figment has  some generic result messages for  strategics that it
  7713.           will use, but you can write your own, more specific messages in a
  7714.           pre-command rule.  Figment  will look for an active  rule testing
  7715.           for the shoot function  and defer to the messages therein.   This
  7716.           rule must be a "While" rule.  (This is very important.  Otherwise
  7717.           it  will  switch  itself off  and  be skipped.)    It  would look
  7718.           something like this:
  7719.  
  7720.               Switched: On  Command: Enabled
  7721.             While {
  7722.               Player  does shoot  bow
  7723.               ...other conditions...
  7724.             } Then {
  7725.               No executional expressions
  7726.             } Message  5 Total  Switched: OFF  Current Msg: 1
  7727.             1  <Disaster>
  7728.             2  <Bad but surviving>
  7729.             3  <Still missed>
  7730.             4  <Wounded opponent>
  7731.             5  <Successful hit>
  7732.  
  7733.           This special rule in no way prohibits you from writing other pre-
  7734.  
  7735.           124
  7736.  
  7737.  
  7738.  
  7739.  
  7740.  
  7741.  
  7742.  
  7743.           Figment User's Guide                                 Story Design
  7744.  
  7745.           command  rules that will  prevent the  player from  shooting, but
  7746.           those rules should appear after this special rule in the sequence
  7747.           (curious, but true).   Figment will  take the first "shoot"  rule
  7748.           that it finds when it wants messages.
  7749.  
  7750.           Figment  weights  the  results  of  the random  number  generator
  7751.           according  to the Player's skill and grids the results on a scale
  7752.           of 1 to  5 with  1 being disastrous.   It then  reports the  nth.
  7753.           message from your rule or its generic message list.
  7754.  
  7755.           A result of  one is disastrous.   The player's  health is set  to
  7756.           zero.   This  will kill  the player,  but it  is  subject to  the
  7757.           aforementioned  escape clause  (see  "Conflicts"  above)  so  the
  7758.           player might survive severely wounded.
  7759.  
  7760.           Results of  two and three are simply misses  and only cost a move
  7761.           and the ammunition.
  7762.  
  7763.           A result of  four results in wounding the opponent.  The opposing
  7764.           object's health is decremented by the amount of the  ammunition's
  7765.           strength.    Remember  to specify  the  health  for  the opposing
  7766.           object, otherwise this  score will be equivalent  to a successful
  7767.           hit regardless of the  ammunition's strength.  Consider  also the
  7768.           effect of negative attributes for  the ammunition's strength; the
  7769.           opponent would get healthier the more it was "wounded":
  7770.  
  7771.             "Ooh.  Now you've made him very, very mad."
  7772.  
  7773.           Five is a successful  hit.  The opponent object  will be stripped
  7774.           of its  possessions and  removed from  the scene.   The  player's
  7775.           score  will be  incremented one  point.   You can  write a  post-
  7776.           command  rule  that tests  for  the  absence of  the  opponent to
  7777.           deliver  whooping  congratulations  and  further  increment   the
  7778.           Player's score if you like.  If your story line hinges around the
  7779.           opponent's corpse  you may  rename the  late lamented object  and
  7780.           reintroduce it with this same rule.
  7781.  
  7782.           Although you do want to specify your ammunition's strength, there
  7783.           is  no  need to  specify  strength  or magic  attributes  for the
  7784.           strategic weapon itself.
  7785.  
  7786.  
  7787.           N.  Food 
  7788.  
  7789.           As mentioned under  parameter editing, you can  control Figment's
  7790.           behavior regarding food.  Depending on your settings, your player
  7791.           may  be satisfied for days between rations  or they may be forced
  7792.           into a feeding frenzy.
  7793.  
  7794.           You also set  the food  value for  the food item  by setting  the
  7795.  
  7796.                                                                         125
  7797.  
  7798.  
  7799.  
  7800.  
  7801.  
  7802.  
  7803.  
  7804.           Story Design                                 Figment User's Guide
  7805.  
  7806.           object's limit attribute up to its maximum (32).  Thus some foods
  7807.           may satisfy your  craving while others  are empty.  (Didn't  your
  7808.           mother tell you  this?)   The player's maximum  gain from a  food
  7809.           item is  limited by  his or  her skill at  the time  the item  is
  7810.           consumed so novices  should conserve  their rations while  newly-
  7811.           anointed wizards might want to reward themselves with a pause for
  7812.           refreshment.
  7813.  
  7814.           You may also  fortify your food  with Strength, Magic and  Health
  7815.           attributes since these  will be  added to the  Player's when  the
  7816.           food is consumed.   Negative attributes are allowed here  as with
  7817.           potions.
  7818.  
  7819.           Guard  your food.   Figment can be  a bit piggish  at times.  Bon
  7820.           appetit.
  7821.  
  7822.  
  7823.           O.  Characters as Containers 
  7824.  
  7825.           Ordinarily,  the player  cannot  tell  when  a character  has  an
  7826.           object, but  if you  set the  character's  sub-type attribute  to
  7827.           "Container",  Figment  will   report  the   container-character's
  7828.           contents when the character's  Open flag is  set to "Open".   You
  7829.           can then write rules  that manipulate the flag and  hence display
  7830.           or not display the character's possessions at your whim.
  7831.  
  7832.  
  7833.           P.  Rules and Changing Scenes 
  7834.  
  7835.           From the nature  of rule base processing  as it was  defined, you
  7836.           should  understand  how  the  rule  bases perform  when  changing
  7837.           scenes.  The last rule base to  be processed when exiting a scene
  7838.           will be  that scene's Pre-command  Rule Base.   The  change-scene
  7839.           command will execute and the Post-command rules for the new scene
  7840.           will be processed.
  7841.  
  7842.           If you write rules fashioned as "If" rules and place them  in the
  7843.           new scene's Post-command rule base, they can fire when the player
  7844.           arrives in  the scene.  These rules  then serve to initialize the
  7845.           scene.   Of course, these rules only function one time since "If"
  7846.           rules expire so the effect is  lost when players repeatedly enter
  7847.           the same scene.
  7848.  
  7849.  
  7850.           Q.  User-definable Command Parser
  7851.  
  7852.           The user-definable command parser allows virtually any command in
  7853.           play mode to trigger pre-command rules.
  7854.  
  7855.           The  executable  function,  "say_cmnd" parses  the  command  line
  7856.  
  7857.           126
  7858.  
  7859.  
  7860.  
  7861.  
  7862.  
  7863.  
  7864.  
  7865.           Figment User's Guide                                 Story Design
  7866.  
  7867.           according to a specification given in the first message of a pre-
  7868.           command rule.  It looks like this:
  7869.  
  7870.             If { 
  7871.               Player  does say_cmnd   
  7872.             } Then { 
  7873.               add_to  Consulting Room  Johnson 
  7874.               copy msg to  Player's view of  Watson's  Long Desc.
  7875.               change_score     1
  7876.             } Message  2 Total   Switched: OFF  Current Msg: 2
  7877.             1.  (send or show)(him or  Johnson)(in or up) or thank  you mrs
  7878.                 hudson 
  7879.             2.  Watson prepares to take notes. 
  7880.  
  7881.           The first message of  the rule is a specification  for acceptable
  7882.           words or phrases on a  command line.  The remaining messages  are
  7883.           available for other uses.  Let's see how the specification works.
  7884.           Imagine the situation:
  7885.  
  7886.             Your faithful housekeeper Mrs. Hudson announces your visitor.
  7887.             "There's a Mr. Johnson to see you, Mr. Holmes."
  7888.  
  7889.           Your reply might be:
  7890.  
  7891.             >show him in please
  7892.             or
  7893.             >send him up
  7894.             or
  7895.             >thank you mrs hudson
  7896.  
  7897.           The specification in the pre-command rule reads:
  7898.  
  7899.             (send or show)(him or Johnson)(in or up) or thank you
  7900.             mrs hudson 
  7901.  
  7902.           The parentheses "()" serve  to "AND" phrases while the  keyword "
  7903.           or " serves as the boolean "OR" operator.  This example specifies
  7904.           several acceptable combinations of words  and/or phrases which we
  7905.           can group as follows:
  7906.  
  7907.             send    him   in
  7908.             show    Johnson up
  7909.  
  7910.           It also allows the phrase:
  7911.  
  7912.             thank you Mrs Hudson
  7913.  
  7914.           This is something like choosing from  a Chinese menu.  Choose one
  7915.           from column  A,  one from  column  B,  etc.   According  to  this
  7916.           example,  you  must  choose one  from  each  column, because  the
  7917.  
  7918.                                                                         127
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.  
  7925.  
  7926.           Story Design                                 Figment User's Guide
  7927.  
  7928.           parentheses  indicate they have  all been  anded together.   This
  7929.           yields a number of legal statements that the player might give:
  7930.  
  7931.             send him in
  7932.             send Johnson in
  7933.             send him up
  7934.             send Johnson up
  7935.             show him in
  7936.             show Johnson in
  7937.             show him up
  7938.             show Johnson up
  7939.             thank you Mrs Hudson
  7940.  
  7941.           Of course if  the player gives  extra words, Figment will  ignore
  7942.           them:
  7943.  
  7944.             >send him in please Mrs Hudson
  7945.  
  7946.           The  player must  give the  full phrase  in order to  trigger the
  7947.           rule:
  7948.  
  7949.             >thank you
  7950.  
  7951.           is not enough unless you modify the specification to allow it:
  7952.  
  7953.             (send or show)(him or Johnson)(in or up) or thank you
  7954.             mrs hudson or thank you
  7955.  
  7956.           Another legitimate specification to achieve the same end is:
  7957.  
  7958.             (send or show)(him or Johnson)(in or up) or (thank you)
  7959.             (mrs hudson or )
  7960.  
  7961.           A  rule like  this can  be  placed in  any pre-command  rule base
  7962.           either global or local.  Presumably most will be local.
  7963.  
  7964.           The  user-definable  parser is  deliberately  tolerant.   It will
  7965.           accept the legal phrases  in any order.  All that  is required is
  7966.           to give the requisite number of phrases.  The specification:
  7967.  
  7968.             (send or show)(him or Johnson)(in or up) or thank you
  7969.             mrs hudson 
  7970.  
  7971.           will  accept "him in send", but  not "Mrs Hudson thank you" while
  7972.           the specification:
  7973.  
  7974.             (send or show)(him or Johnson)(in or up) or (thank you)
  7975.             (mrs hudson or)
  7976.  
  7977.           will accept "Mrs Hudson thank you".
  7978.  
  7979.           128
  7980.  
  7981.  
  7982.  
  7983.  
  7984.  
  7985.  
  7986.  
  7987.           Figment User's Guide                                 Story Design
  7988.  
  7989.  
  7990.           The user-definable command parser  can be negated.  This  has the
  7991.           effect of  firing the  rule until  the player  gives the  desired
  7992.           command.  For example:
  7993.  
  7994.             While { 
  7995.               Player  does not say_cmnd   
  7996.               Consulting Room  is linked to  Mrs. Hudson 
  7997.             } Then { 
  7998.               No Executional Expressions. 
  7999.             } Message  2 Total   Switched: ON  Current Msg: 2
  8000.              1. (send or show)(him or Johnson)(in or up) or thank you   mrs
  8001.                 hudson 
  8002.              2. Mrs. Hudson discreetly clears her throat. 
  8003.  
  8004.           The negated rule will  fire until the player gives  the specified
  8005.           command.  You may wish to write  negated command rules as "If" or
  8006.           "For"  rules instead of "While" rules so that they can switch off
  8007.           after a few tries.  Otherwise, they can be very frustrating.
  8008.  
  8009.           The  user-parser  has  the  third  highest precedence  after  the
  8010.           system-level  commands  (restart,  save, toggle,  etc.)  and  the
  8011.           synonym processing so that you can use any word or phrase even if
  8012.           it  is similar  to  Figment's built-in  functions.   Phrases like
  8013.           "take off" and "drop  dead" can be used without  triggering error
  8014.           messages:  "There's  no off  here" or  "You  don't have  a dead".
  8015.           Negated  user-defined  commands  will not  interfere  with system
  8016.           level commands, because they have lower precedence.
  8017.  
  8018.           Note that punctuation must  be avoided.  Punctuation has  special
  8019.           meaning to the command parser.  The comma (,) means make a series
  8020.           operation as in "take  bat, ball, glove".  Similarly,  the period
  8021.           (.) means  end the command  or separate commands.   If the player
  8022.           gives the command:
  8023.  
  8024.             Thank you, Mrs. Hudson.
  8025.  
  8026.           Figment will interpret this as:
  8027.  
  8028.             Thank you ;"I don't understand the command `Thank'".
  8029.             Thank Mrs ;"I don't understand the command `Thank'".
  8030.             Hudson  ;"I don't understand the command `Hudson'".
  8031.  
  8032.           The player must simply ignore punctuation except where it is used
  8033.           to signal series  operation or command termination.   Upper/lower
  8034.           case distinctions are of course ignored.
  8035.  
  8036.           There are words  that will  defeat your desired  statement.   You
  8037.           will want to exclude any statement that uses  them.  For example,
  8038.           the statement "send him in" would be defeated if the  player used
  8039.  
  8040.                                                                         129
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.  
  8047.  
  8048.           Story Design                                 Figment User's Guide
  8049.  
  8050.           "do not"  as in  "do not send  him in"  or "don't".   The  phrase
  8051.           "Thank you Mrs Hudson" would  be defeated if the player  said "No
  8052.           thank you Mrs Hudson".  You want to specify these negative words,
  8053.           and you can do that by enclosing them in square brackets  "[]" as
  8054.           follows:
  8055.  
  8056.             [do not or dont](send or show)(him or Johnson)(in or up)  o   r
  8057.             [no](thank you)(mrs hudson or )
  8058.  
  8059.           The square brackets can be specified in any order.  The following
  8060.           example is equivalent to the previous example:
  8061.  
  8062.             (send or show)(him  or Johnson)(in  or up)[do not  or dont]  or
  8063.             (thank you)(mrs hudson or )[no]
  8064.  
  8065.           Note that the contraction "don't" was  written as "dont" and that
  8066.           the abbreviation "Mrs." was written as "mrs".  Punctuation should
  8067.           not be  included in  the specification  message, but  upper/lower
  8068.           case distinctions do not matter.
  8069.  
  8070.  
  8071.           R.  The Actor in Rules
  8072.  
  8073.           You can use  the term  "Actor" in your  expressions wherever  you
  8074.           might use  a character.  When you use  the Actor, you are testing
  8075.           for "whomever might be  speaking" as opposed to the  Player which
  8076.           refers specifically to the object reserved for the user.
  8077.  
  8078.           Using the Actor in your conditional expressions has the advantage
  8079.           of flexibility since  it is  a more general  term than  "Player".
  8080.           This asset turns into a liability  when you use it in executional
  8081.           expressions.  It can produce chaos, because function destinations
  8082.           will be  determined at run-time.   There is no  telling where the
  8083.           following   message  might  end  up  although  it  is  a  correct
  8084.           construction:
  8085.  
  8086.             copy msg to  Actor's view of  Actor's  Long Desc.
  8087.  
  8088.           Consider using the Actor instead of the Player when writing rules
  8089.           designed to contain  the story  to a particular  scene until  the
  8090.           user  has resolved some task.  If  you do not test for the Actor,
  8091.           the user  can change  to another  character and  slip through  to
  8092.           another scene and  change back.   A pre-command  rule to  prevent
  8093.           this might look like this:
  8094.  
  8095.             Scene: X    Rule: 1 of n   Switched: ON  Disabled
  8096.  
  8097.             If {
  8098.               Actor  does go  Anywhere
  8099.               <scene name> is locked
  8100.  
  8101.           130
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.           Figment User's Guide                                 Story Design
  8110.  
  8111.             } Then {
  8112.               No Executionals
  8113.             } Message 1 Total  Switched: ON  Current Message: 1
  8114.             1. Sorry.  You can't go yet.
  8115.  
  8116.  
  8117.           S.  The '@'-Words
  8118.  
  8119.           Special system names and words can be incorporated into your text
  8120.           using special names within your text string.  These special names
  8121.           are indicated  by the at-symbol  (@).  The names  must be spelled
  8122.           exactly as you see them here, including the capital letters.
  8123.  
  8124.           Whenever your text  is used, Figment substitutes  the appropriate
  8125.           text for the  special name.   Hence these special names  function
  8126.           like text variables within your text.
  8127.  
  8128.           The words are:
  8129.  
  8130.             @Actor - Substitutes the current actor's name.
  8131.  
  8132.             @Player -  Substitutes the  current Player's  name.   Typically
  8133.             this yields the User's  first name, but during  development and
  8134.             testing of your story, it would be the generic text "Player".
  8135.  
  8136.             @Scene - Substitutes the current scene name.
  8137.  
  8138.             @It -  Substitutes the  last object  name used  in the  command
  8139.             line.
  8140.  
  8141.             @Them - Substitutes the last series of object names used in the
  8142.             command line.
  8143.  
  8144.             @Full_name - Substitutes  the user's  full name.   This is  the
  8145.             preferred form  when you  want the  full name  since it  avoids
  8146.             problems with titles, middle names, four names, reversed names,
  8147.             etc.  @Full_name is loaded when  "@Get_User" is inserted in the
  8148.             title  message.   If  "@Get_User"  is  omitted from  the  title
  8149.             message, "@Full_name" is empty.
  8150.  
  8151.             @User[n] -  where n  = 0  through 2.    Substitutes the  User's
  8152.             first, middle or  last name.   User[0] is  reliably the  user's
  8153.             first name.  User[1] is the middle name and is empty  when less
  8154.             than three names are entered.  User[2] is the  second name when
  8155.             two names are entered, otherwise it is the third name.   People
  8156.             with four names suffer.  Titles such as "Sr., Jr., II, and III"
  8157.             are lost.  Many  cultures place the family  name first and  the
  8158.             individual's name last.   There is no support for  this.  @User
  8159.             is loaded by @Get_User during title message processing.
  8160.  
  8161.  
  8162.                                                                         131
  8163.  
  8164.  
  8165.  
  8166.  
  8167.  
  8168.  
  8169.  
  8170.           Story Design                                 Figment User's Guide
  8171.  
  8172.             @Command - Substitutes the current  command sentence.  You  can
  8173.             give commands  consisting of  several sentences,  but they  are
  8174.             processed one sentence  at a time  so this returns the  current
  8175.             sentence.
  8176.  
  8177.             @Words[n] -  where n  =  0 to  maximum words  in command  line.
  8178.             Probably  Words[0] is  most useful  since  it is  typically the
  8179.             verb.
  8180.  
  8181.             @Msg: n
  8182.  
  8183.  
  8184.  
  8185.  
  8186.  
  8187.  
  8188.  
  8189.  
  8190.  
  8191.  
  8192.  
  8193.  
  8194.  
  8195.  
  8196.  
  8197.  
  8198.  
  8199.  
  8200.  
  8201.  
  8202.  
  8203.  
  8204.  
  8205.  
  8206.  
  8207.  
  8208.  
  8209.  
  8210.  
  8211.  
  8212.  
  8213.  
  8214.  
  8215.  
  8216.  
  8217.  
  8218.  
  8219.  
  8220.  
  8221.  
  8222.  
  8223.           132
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  8231.           Figment User's Guide                                 Story Design
  8232.  
  8233.                                         Index
  8234.  
  8235.           +  37, 39, 51, 63                 Conflicts
  8236.           @-Words  131                        Conclusions  117
  8237.           @Actor  131                         design notes  116
  8238.           @Command  132                     Containers  7, 14, 22, 85,
  8239.           @Full_name  95, 131                   119
  8240.           @Get_User  95                       link limit  119
  8241.           @It  131                            reporting contents of  41
  8242.           @Player  131                      Copy_Msg_To  85
  8243.           @Scene  131                       Cursor Control Keys  35
  8244.           @Them  131                        Cut  32, 36, 64
  8245.           @User[n]  131                       Expressions  72
  8246.           @Words[n]  132                      rules  63, 64
  8247.           Actor                               Test Messages  73
  8248.             during playback  11               Text  33
  8249.             in rules  130                   Data Set Files  108, 111
  8250.             viewpoints  45                  Debugging Tips  112
  8251.           Advance  35                       Delete  37, 63
  8252.           Alphabetizing objects  40           Player object  40
  8253.           Alt-F7  33, 37, 64, 72, 73          rules  63
  8254.           Armor  41                           with objects  39
  8255.           Articles                          Directions
  8256.             in commands  9                    during play  19
  8257.           Assign_User_Type  84              Display
  8258.           Attributes                          switch  5
  8259.             as arguments  70                Does_Action  77
  8260.             editing operations  41          Does_Fit_Profile  78
  8261.             failure to specify  113         Does_Have_Attribute  78
  8262.             in scenes  49                   Drink  14, 121
  8263.             negative  118                   Drop  15
  8264.             with food  126                  Eat  15
  8265.             with potions  121               Editing Operations
  8266.           Change User-Attribute               summary of  35
  8267.             executional function  84        Error Messages
  8268.           change_health  115, 116             in editor  32
  8269.           change_score  114                 Examination Message  44, 115
  8270.           Characters                          victory message  117
  8271.             as containers  126              Examine  15
  8272.           Charm  14                           message design  115
  8273.           CHKDSK  17                        Executional
  8274.           Close  14, 85                       clause  57
  8275.           Comma Operator                    Executional Function
  8276.             in commands  9                      Reference  84
  8277.           Command Parser                    Expression  67
  8278.             User-definable  126               editing  67
  8279.           Command Reference  14               modifier  69, 75
  8280.           Command Window  7                   negation  68, 69
  8281.           Conditional clause  57            F1 - Enter Editor  15, 34
  8282.             types of  57                      also exit from editor  36
  8283.  
  8284.                                                                         133
  8285.  
  8286.  
  8287.  
  8288.  
  8289.  
  8290.  
  8291.  
  8292.           Story Design                                 Figment User's Guide
  8293.  
  8294.           F10 - DOS Shell  17, 37           Insert  32, 37, 64
  8295.             in editor  35                   Interrupt
  8296.           F2  36                              log files  23
  8297.             read a file  35                 Inventory
  8298.           F3                                  changes w/actor  11
  8299.             write a file  35, 36              DOS switch  5
  8300.           F4 - Listing  36                  Is_dead  78
  8301.             objects  38                     Is_linked_to  79
  8302.             rule bases  66                  Is_locked  80
  8303.           F5 - Alphabetize Objects  36      Is_open  80
  8304.           F6  9, 74                         Is_type  81
  8305.           F6 - Text Editor  36              Is_wizard  81
  8306.           F7  32, 33, 36, 64, 72, 73        it  10
  8307.           F9 - Step a log file  16          Kill  88
  8308.           Figglu  3                         Labels  47
  8309.           Fight  17, 117                      user types  43
  8310.           Figlet  1                         Limit
  8311.           File                                ammunition  123
  8312.             input/output  35                  editing  42
  8313.             management  105                   food value  126
  8314.             naming convention  105          Link_to  88
  8315.           Find  18                          Links
  8316.           Flags  41, 42, 49                   design notes  118
  8317.           Food  42, 115, 118                  editing operations  48
  8318.             design notes  125                 in scenes  49
  8319.             limited by skill  114, 126        type labels  98
  8320.             parameter editing  96           Listing
  8321.             sub-type attribute  41            objects  38
  8322.           FOR  57, 61, 86                     rule bases  66
  8323.           Full-Screen Text Editor           Lock  21, 58, 89
  8324.             description of  104               editing  123
  8325.           Give  18                          Log  8, 21, 120
  8326.           Global Rule Bases  65               play a log file  23
  8327.           Go  19, 20, 70, 75, 87              step a log file  16
  8328.           Go_to_Map_Block  86               Logic Programming  54
  8329.           Goody                             Magic  116
  8330.             sub-type attribute  41            editing  41
  8331.           Have_Attribute  78                Message
  8332.           Health  17, 114                     editing  73
  8333.             design notes  115                 pointer  61, 83, 87, 89
  8334.             editing  41                     Method of Editing  30
  8335.             recovery  18                    Move count  19, 24
  8336.           Hex  20, 117                      Msg_to_name  89
  8337.           Hit  20                           Negating rules  76
  8338.           Home key  37, 68, 69              Negative Attributes
  8339.           IF  57                              in conflicts  118
  8340.             delayed execution  62           Objects
  8341.           Inc_moves  87                       creating them  39
  8342.           Inc_msg  87                         definition of  38
  8343.           Inc_score  85                       deleting  39, 111
  8344.  
  8345.           134
  8346.  
  8347.  
  8348.  
  8349.  
  8350.  
  8351.  
  8352.  
  8353.           Figment User's Guide                                 Story Design
  8354.  
  8355.             names  38                         entry scene  52
  8356.             User Types  43                    objects  38
  8357.           On_skill  89, 115                   rules and changing  126
  8358.           Open  22, 41, 49, 80, 90          Screen Display  6
  8359.           Page-Down  35                     Scrolling  30, 35
  8360.           Parameter                         Scrolls  41, 123
  8361.             editing  94                     Series  9
  8362.           Paste  32, 33, 64                 Shift-F2
  8363.           Pause  22                           read save file  36
  8364.           Period Operator                   Shift-F3
  8365.             in commands  9                    write save file  36
  8366.           Play  23                          Shift-F4 - Write Full Listing 
  8367.           Player Map  92                        36
  8368.           Player Object  40                 Shift-F7  33
  8369.           Potions                           Shoot  26
  8370.             design notes  121               Size  41, 122
  8371.           Pre-Command                       Skill
  8372.             explanation of  74                design notes  114
  8373.           Presentation Environment  4         is_wizard  81
  8374.           Probable Event  81                  levels  114
  8375.           Profiles  99                        on-skill  89
  8376.           Pronouns  71                        when shooting  26
  8377.           Put  23                           Standard Messages  101
  8378.           Quit  24                          Starting
  8379.           Random Number Generator             existing story  4
  8380.             controlling  120                  new story  4, 106
  8381.           Read  24                          Status
  8382.           Remove_User_Type  90                editing  96
  8383.           Restart  24, 109                    Indicator  6
  8384.           Restore  23, 24, 109                switch  5
  8385.           Rules                             story
  8386.             adding/deleting  63               restarting  24, 25
  8387.             changing scenes via  126          story editor  28
  8388.             copying  63                       story elements  34
  8389.             current message  60             Story Design  114
  8390.             definition of  57               Story Editor  28
  8391.             editing  62                     Story Map  19, 86, 93
  8392.             expression editing  67            Complex maps  52
  8393.             negating  76                      editing  50
  8394.             re-ordering  63                   path  51
  8395.           Save  17, 21, 23-25, 36,            restricts scene change  65
  8396.               105, 106, 108                   Simple Maps  51
  8397.           Say_cmnd  82                      Strategic Weapons  123
  8398.           Scene Description  49, 60         Strength  17, 116
  8399.             highlights changes  6             design notes  116
  8400.             with Actor change  11             editing  41
  8401.           Scene Editor  49                  Stuff  37
  8402.           Scene-change  50                    names  38
  8403.           Scenes                              objects  38
  8404.             changing in editor  65          Stuff Editor  37
  8405.  
  8406.                                                                         135
  8407.  
  8408.  
  8409.  
  8410.  
  8411.  
  8412.  
  8413.  
  8414.           Story Design                                 Figment User's Guide
  8415.  
  8416.           Sub-type attribute  41
  8417.           Synonym  93
  8418.           Syntax
  8419.             explanation of symbols  14
  8420.           Take  26
  8421.           Take_from  90
  8422.           Text
  8423.             changing it  31
  8424.             erasing  31
  8425.             length of  31
  8426.           Text editor  31, 37
  8427.             for commands  9
  8428.             invoking  104
  8429.             key definition summary 
  8430.               104
  8431.           them  10
  8432.           Toggle  6, 26
  8433.           Toggle_lock  90
  8434.           Toggle_open  90
  8435.           Top Level Editor
  8436.             description of  34
  8437.             file i/o  109
  8438.           Type attribute  41, 50
  8439.           Unlock  26, 91
  8440.           User Types  43
  8441.             defining labels  97
  8442.           User-Definable Attributes
  8443.             defining labels  98
  8444.             editing  46
  8445.           User-definable Command
  8446.               Parser  126
  8447.           Viewpoints
  8448.             editing  45
  8449.           Wager  17
  8450.           Wait  27
  8451.           Weapon  41
  8452.           Weight  41, 121
  8453.           Weight factors
  8454.             in profiles  100
  8455.           WHILE  57
  8456.  
  8457.  
  8458.  
  8459.  
  8460.  
  8461.  
  8462.  
  8463.  
  8464.  
  8465.  
  8466.  
  8467.           136
  8468.